Re: SELECT * FROM LIMIT 1; is really slow - Mailing list pgsql-hackers
From Tom Lane
Subject Re: SELECT * FROM LIMIT 1; is really slow
Date
Msg-id 13569.1085664586@sss.pgh.pa.us
Whole thread Raw
In response to Re: SELECT * FROM LIMIT 1; is really slow  (Dennis Bjorklund <db@zigo.dhs.org>)
List pgsql-hackers
Dennis Bjorklund <db@zigo.dhs.org> writes:
> On Wed, 26 May 2004, Tom Lane wrote:
>> I'm not real sure where to document this
>> trick but it seems like we ought to mention it someplace.

> Isn't it better to detect a UPDATE without a where and do that update in 
> the same way as the alter table above? Then we don't need to document and 
> learn a new non standard way of doing an update.

No, because the locking implications are completely different.  I don't
want UPDATE to suddenly decide it needs an exclusive lock on the table
based on the shape of the WHERE clause.
        regards, tom lane


pgsql-hackers by date:

Previous
From: pgsql@mohawksoft.com
Date:
Subject: Re: tablespaces and DB administration
Next
From: David Blasby
Date:
Subject: Re: SELECT * FROM LIMIT 1; is really slow