pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bryce Nesbitt <bryce1@obviously.com>
To: pgsql-sql@postgresql.org
Cc: Peter Eisentraut <peter_e@gmx.net>
Subject: Re: Very slow updates when using IN syntax subselect
Date: Sat, 11 Feb 2006 14:43:03 -0800
Message-ID: <43EE6877.7080002@obviously.com> (raw)
In-Reply-To: <200602112134.57572.peter_e@gmx.net>
References: <43ECFF0B.80905@obviously.com>
	<7972.1139672862@sss.pgh.pa.us>
	<43EE3F77.6020108@obviously.com>
	<200602112134.57572.peter_e@gmx.net>

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




view thread (9+ messages)  latest in thread

Message-ID: <43EE6877.7080002@obviously.com>
Permalink:  ../43EE6877.7080002@obviously.com/
Also on:    postgresql.org/message-id/43EE6877.7080002@obviously.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bryce1@obviously.com, peter_e@gmx.net
  Subject: Re: Very slow updates when using IN syntax subselect
  In-Reply-To: <43EE6877.7080002@obviously.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox