SQLの実行時間を調べる の編集mysql> SET profiling = 1; mysql> SHOW PROFILES; +----------+------------+-------------------------------------+ | Query_ID | Duration | Query | +----------+------------+-------------------------------------+ | 1 | 0.24838463 | CREATE TABLE t1 ( n int ) | | 2 | 0.07959324 | INSERT INTO t1 ( n ) VALUES ( 100 ) | | 3 | 0.04948013 | SELECT * FROM t1 | +----------+------------+-------------------------------------+ 3 rows in set (0.03 sec)
プロファイルを消すSET @@profiling = 0; SET @@profiling_history_size = 0; SET @@profiling_history_size = 100; SET @@profiling = 1; または TRUNCATE TABLE information_schema.PROFILING; または、ログアウトする 参考 |
|