Re: Very slow updates when using IN syntax subselect - Mailing list pgsql-sql

From Bryce Nesbitt
Subject Re: Very slow updates when using IN syntax subselect
Date
Msg-id 43EE6877.7080002@obviously.com
Whole thread Raw
In response to Re: Very slow updates when using IN syntax subselect  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-sql
Peter Eisentraut wrote:
> Bryce Nesbitt wrote:
>   
>>> It seems pretty clear that you've never vacuumed nor analyzed these
>>> tables ... else the planner would have some clue about their sizes.
>>> Do that and then see what you get.
>>>       
>> They occur in fine time.  That's good, thanks.  But jeeze, can't
>> postgres figure this out for itself?
>>     
>
> I'm sure you wouldn't appreciate it if PostgreSQL did a full table scan 
> before each query to figure out the total size of the involved tables.
>   
Nope.

But let's say the query optimizer thought the table had one row.
The the query starts, and 111,000 rows later...

It seems that a mismatch between the static table size, and the actual
one counted as you go, would be a quick
check.  That could set a flag for later background processing....
                                                      -Bryce



pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Very slow updates when using IN syntax subselect
Next
From: Tom Lane
Date:
Subject: Re: Very slow updates when using IN syntax subselect