Is there a way to get rows_examined in MySQL without the slow log?

后端 未结 4 585
无人及你
无人及你 2020-12-19 09:26

I\'m building some profile information for a home grown app. I\'d like the debug page to show the query sent along with how many rows were examined without assuming that slo

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-19 09:40

    Starting in 5.6.3, the MySQL performance_schema database also exposes statements statistics, in tables such as performance_schema.events_statements_current.

    The statistics collected by statements include the 'ROWS_EXAMINED' column.

    See http://dev.mysql.com/doc/refman/5.6/en/events-statements-current-table.html

    From there, statistics are aggregated to provide summaries.

    See http://dev.mysql.com/doc/refman/5.6/en/statement-summary-tables.html

提交回复
热议问题