For example:
UPDATE tab_name SET col_name=? WHERE col_name='a_unique_str' LIMIT 1;
The column col_name has no index, but we know the 'a_unique_str' is indeed unique. Does LIMIT 1 makes such a query faster?
(It's not difficult to do a simple benchmark, but I'd like to know if it works the same way in different databases, or any possible connection with database tuning.)
(Some databases like Oracle don't have LIMIT. I suppose they all have their equivalent clauses.)
Aucun commentaire:
Enregistrer un commentaire