Will limiting a query to one result record, improve performance in a large(ish) MySQL table if the table only has one matching result?
for example
s
To answer your questions in order: 1) yes, if there is no index on name. The query will end as soon as it finds the first record. take off the limit and it has to do a full table scan every time. 2) no. primary/unique keys are guaranteed to be unique. The query should stop running as soon as it finds the row.