After I add LIMIT 1 to some MySQL query, will it stop the search after it finds 1 result (thus which makes it faster) or will it still fetch all the results and truncate in the finish?

With respect to the query, adding a restriction clause may have a huge impact on performance. If you would like just one row (or know for certain that just one row satisfies the query), and therefore are unsure about how exactly the interior optimizer will execute it (for instance, WHERE clause not striking a catalog and so on), then you definitely should certainly give a LIMIT clause.

For enhanced queries (using indexes on small tables) it most likely will not matter much in performance, however - if you're only thinking about one row than give a LIMIT clause regardless.

Limit can impact the performance from the query (see comments and also the link below) and in addition it cuts down on the result set that's output by MySQL. For any query that you expect just one result there's benefits.

Furthermore, restricting the end result set can speed the entire query time as moving large result sets use memory and potentially create temporary tables on disk. I mention this when i lately saw a application that didn't use limit kill a server because of huge result sets with limit in position the resource utilization dropped greatly.

Take a look page for additional specifics: MySQL Documentation: LIMIT Optimisation

If there's only one result returning, then no, LIMIT won't allow it to be any faster. If you will find lots of results, and also you just have the very first result, and there's no GROUP or ORDER by claims then LIMIT can make it faster.

Should you really only expect a single result, it is sensible to append the LIMIT for your query. I'm not sure intricacies of MySQL, but I am sure it will not gather an effect group of 100'000+ records simply to truncate it to 1 in the finish..