Home >Database >Mysql Tutorial >如何提高mysql大批量数据更新(update)的效率?

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

WBOY
WBOYOriginal
2016-06-06 09:38:482718browse

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>

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

Statement:
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