*Anibal David Acosta
*Sent:* Thursday, December 16, 2010 11:19 AM
*To:* pgsql-admin@postgresql.org
*Subject:* [ADMIN] using limit
Hi
I really like to do efficient SQL queries so, my question is if I am
expecting no more than one row from a select, using the LIMIT 1 could
improve the performance
Yes, a limit should speed up your query from the sounds of things.
*From:* Anibal David Acosta [mailto:a...@devshock.com]
*Sent:* Thursday, December 16, 2010 11:34 AM
*To:* 'Michael Holt'; pgsql-admin@postgresql.org
*Subject:* RE: [ADMIN] using limit
Is a table with 10 million of r
like this:
Select column1 from myTable where Column2 between X and Y
I am expecting just one record
De: Michael Holt [mailto:mich...@aers.ca]
Enviado el: jueves, 16 de diciembre de 2010 04:23 p.m.
Para: Anibal David Acosta; pgsql-admin@postgresql.org
Asunto: RE: [ADMIN] using limit
Hi
I really like to do efficient SQL queries so, my question is if I am
expecting no more than one row from a select, using the LIMIT 1 could
improve the performance?
If I use my logic, the LIMIT 1 instruction tell to postgres that stop
searching when found 1 record, but maybe it is unnecessa