pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fabio Panizzutti <panizzutti@interlogica.net>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: R: R: Query plan on identical tables differs . Why ?
Date: Fri, 14 May 2004 10:40:24 +0200
Message-ID: <000f01c4398f$1a20cbc0$3c02020a@ufficio> (raw)
In-Reply-To: <8904.1084460460@sss.pgh.pa.us>



>>>-----Messaggio originale-----
>>>Da: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
>>>Inviato: giovedì 13 maggio 2004 17.01
>>>A: Fabio Panizzutti
>>>Cc: 'Shridhar Daithankar'; pgsql-performance@postgresql.org
>>>Oggetto: Re: R: [PERFORM] Query plan on identical tables 
>>>differs . Why ? 
>>>
>>>
>>>"Fabio Panizzutti" <panizzutti@interlogica.net> writes:
>>>> I don't understand why the planner chose a different query plan on 
>>>> identical tables with same indexes .
>>>
>>>Different data statistics; not to mention different table 
>>>sizes (the cost equations are not linear).
>>>
>>>Have you ANALYZEd (or VACUUM ANALYZEd) both tables recently?
>>>
>>>If the stats are up to date but still not doing the right 
>>>thing, you might try increasing the statistics target for 
>>>the larger table's tag_id column.  See ALTER TABLE SET STATISTICS.
>>>
>>>			regards, tom lane
>>>

All tables are vacumed and analyzed . 
I try so set statistics to 1000 to tag_id columns with ALTER TABLE SET
STATISTIC, revacuum analyze ,  but the planner choose the same query
plan . 
I'm trying now to change the indexes .

Thanks 






view thread (4+ messages)  latest in thread

Message-ID: <000f01c4398f$1a20cbc0$3c02020a@ufficio>
Permalink:  ../000f01c4398f$1a20cbc0$3c02020a@ufficio/
Also on:    postgresql.org/message-id/000f01c4398f$1a20cbc0$3c02020a@ufficio

 · 

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-performance@postgresql.org
  Cc: panizzutti@interlogica.net, tgl@sss.pgh.pa.us
  Subject: Re: R: R: Query plan on identical tables differs . Why ?
  In-Reply-To: <000f01c4398f$1a20cbc0$3c02020a@ufficio>

* 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