(現時点で) 200.000 行を超えるテーブルがあります。すべての行が私のサイトのページで、site.com/itemName のようなわかりやすい URL を使用しています。
私のSlowQueriesログには、そのクエリがあり、1500回以上繰り返され、読み込み時間は1.5秒です。
これはクエリです:
SELECT * FROM table WHERE `name` LIKE 'S' ORDER BY id DESC LIMIT 1
テーブル タイプは MyISAM です。フィールドは、FULLTEXT インデックスを持つ varchar 250 です。また、この MySQLTuner の結果を取得しました。
-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.1.61-log
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 191M (Tables: 4)
[--] Data in InnoDB tables: 48K (Tables: 1)
[!!] Total fragmented tables: 1
-------- Performance Metrics -------------------------------------------------
[--] Up for: 1d 4h 56m 2s (3M q [34.272 qps], 37K conn, TX: 36B, RX: 3B)
[--] Reads / Writes: 91% / 9%
[--] Total buffers: 290.0M global + 2.7M per thread (151 max threads)
[OK] Maximum possible memory usage: 705.2M (68% of installed RAM)
[OK] Slow queries: 0% (2K/3M)
[OK] Highest usage of available connections: 8% (13/151)
[OK] Key buffer size / total MyISAM indexes: 8.0M/63.3M
[OK] Key buffer hit rate: 100.0% (581M cached / 182K reads)
[!!] Query cache efficiency: 4.7% (146K cached / 3M selects)
[OK] Query cache prunes per day: 0
[!!] Sorts requiring temporary tables: 32% (8K temp sorts / 26K sorts)
[OK] Temporary tables created on disk: 5% (3 on disk / 53 total)
[OK] Thread cache hit rate: 99% (13 created / 37K connections)
[OK] Table cache hit rate: 53% (33 open / 62 opened)
[OK] Open file limit used: 5% (59/1K)
[OK] Table locks acquired immediately: 99% (3M immediate / 3M locks)
[OK] InnoDB data size / buffer pool: 48.0K/8.0M