从索引本身检索数据?

时间:2012-08-30 01:46:10

标签: php mysql indexing

我在MySQL中有以下查询:

SELECT sid, date
FROM table
WHERE wid = 12938248 AND url = 'example.com/landingpage'

如果我有这样的索引:

 CREATE INDEX testindex ON table (wid,url,sid,date)

MySQL能否从索引本身检索 sid,date ,还是需要访问磁盘?

谢谢!

1 个答案:

答案 0 :(得分:0)

是的,它只能使用索引检索数据。

是的,它仍然需要访问索引所在的磁盘。