Home > Database > Mysql Tutorial > body text

如何提高mysql大批量数据更新(update)的效率?

WBOY
Release: 2016-06-06 09:38:48
Original
2703 people have browsed it

mysqlsql

本人所写的sql语句如下:

<code> UPDATE result,tmpSET         result.forward_count=ROUND(tmp.fca_s),        result.comment_count=ROUND(tmp.cca_s),        result.like_count=ROUND(tmp.lca_s)WHERE result.uid=tmp.uid;</code>
Copy after login

两个表的数据都达到了一百万条,该语句执行起来非常慢,故请问各位,如何提高update效率。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template