Re: [HACKERS] SELECT * FROM LIMIT 1; is really slow

Thu, 27 May 2004 06:43:15 -0700

Dennis Bjorklund <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to