My question is if using LIMIT
will there be some performance gain in QUERY
.
Example:
SELECT descricao FROM produto WHERE id = 9999 LIMIT 1
Has better performance than?
SELECT descricao FROM produto WHERE id = 9999
Since it would be generic to not specify any tool, I'd like to answer the best known SQlite
, SQL Server
, PostgreSQL
, MySQL
, Oracle
.
It does not necessarily have to be all, but I have preference in SQlite
since it runs on mobile devices where performance / optimization is more complex.