Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 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、日期,还是需要访问磁盘?
谢谢!
是的,它只能使用索引来检索数据。
是的,它仍然需要访问磁盘,因为那是索引所在的位置。