Re: [ADMIN] using limit

2010-12-16 Thread Michael Holt
*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

Re: [ADMIN] using limit

2010-12-16 Thread Michael Holt
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

Re: [ADMIN] using limit

2010-12-16 Thread Anibal David Acosta
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

[ADMIN] using limit

2010-12-16 Thread Anibal David Acosta
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