Suppose I have a table with 1 million rows, with the primary key being the first column.
Then, if I run the following:
SELECT * FROM table WHERE id='tomato117' LIMIT 1
Is the ALL table written to the cache (thereby causing the query to slow down as more rows are added) or will the number of rows in the table not matter because the query uses the primary key?
edit: (added restriction 1)
source
share