using limit

From: "Anibal David Acosta" <aa(at)devshock(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: using limit
Date: 2010-12-16 19:18:50
Message-ID: 001f01cb9d56$13d69790$3b83c6b0$@devshock.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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 unnecessary

Thanks

Anibal

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Holt 2010-12-16 19:23:25 Re: using limit
Previous Message Tsing, Vadim 2010-12-16 19:18:49 Copying database directory