Most efficient query to get last modified record in large table

后端 未结 3 1731
说谎
说谎 2021-01-29 04:06

I have a table with a large number of records ( > 300,000). The most relevant fields in the table are:

  • CREATE_DATE
  • MOD_DATE

Those are updat

3条回答
  •  面向向阳花
    2021-01-29 04:46

    Use EXPLAIN:

    http://dev.mysql.com/doc/refman/5.0/en/explain.html

    This tells You how mysql executes statement, thanks to that You can figure out most efficient way, cause it depends on Your db structure and there is no one universal solution.

提交回复
热议问题