Re: Index speeds up one row table (why)? - Mailing list pgsql-bugs

From Dave E Martin XXIII
Subject Re: Index speeds up one row table (why)?
Date
Msg-id 3ED93812.9010403@dave.to
Whole thread Raw
In response to Index speeds up one row table (why)?  (Dave E Martin XXIII <postgresql-to.dave@dave.to>)
Responses Re: Index speeds up one row table (why)?  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-bugs
Tom Lane wrote:

>Bruno Wolff III <bruno@wolff.to> writes:
>
>
>>It probably has one visible row in it. If it can changed a lot, there
>>may be lots of deleted tuples in a row. That would explain why an
>>index scan speeds things up.
>>
>>
>
>Right, every UPDATE on unique_ids generates a dead row, and a seqscan
>has no alternative but to wade through them all.  When a unique index is
>
Speaking of which, since the row is locked with select for update (so it
can't be involved in any other transactions anyway) and the change
doesn't change the length of the row, can't it just be updated in-place,
or would that break something else? (pardon if this is answered already,
me thinks its time to go reread the todo's and the architecture
documents...)

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: db growing out of proportion
Next
From: Dave E Martin XXIII
Date:
Subject: Re: Index speeds up one row table (why)?