I have the following query in MySQL:
SELECT sid, date
FROM table
WHERE wid = 12938248 AND url = 'example.com/landingpage'
Provided that I have an index as such:
CREATE INDEX testindex ON table (wid,url,sid,date)
Will MySQL be able to retrieve sid, date from the index itself, or will it need to access the disk?
Thanks!
Yes it can retrieve data using only the index.
Yes it will still need to access the disk as that is where the index lives.