私はこのような100Mレコードを持つのInnoDBテーブルがあります。mysql select count(*)を使用してスキャンテーブル全体をスキャンしますか?
id name pid cid createdAt
int char int int timestamp
idがPKで、PIDがインデックス化されていますkey
最も頻繁にクエリがselect count(*) from table1 where pid='pid'
私の質問ですが、このクエリんですテーブル全体をスキャンしますか?