Does adding 'LIMIT 1' to MySQL queries make them faster when you know there will only be 1 result?

摘要

When I add LIMIT 1 to a MySQL query, does it stop the search after it finds 1 result (thus making it faster) or does it still fetch all of the results and truncate at the end?

欢迎在评论区写下你对这篇文章的看法。

评论

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.123.4. UTC+08:00, 2024-04-19 18:02
浙ICP备14020137号-1 $访客地图$