R: R: Query plan on identical tables differs . Why ?

From: "Fabio Panizzutti" <panizzutti(at)interlogica(dot)net>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: R: R: Query plan on identical tables differs . Why ?
Date: 2004-05-14 08:40:24
Message-ID: 000f01c4398f$1a20cbc0$3c02020a@ufficio
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>>>-----Messaggio originale-----
>>>Da: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
>>>Inviato: giovedì 13 maggio 2004 17.01
>>>A: Fabio Panizzutti
>>>Cc: 'Shridhar Daithankar'; pgsql-performance(at)postgresql(dot)org
>>>Oggetto: Re: R: [PERFORM] Query plan on identical tables
>>>differs . Why ?
>>>
>>>
>>>"Fabio Panizzutti" <panizzutti(at)interlogica(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Fabio Panizzutti 2004-05-14 08:55:07 R: R: Query plan on identical tables differs . Why ?
Previous Message Paul Tuckfield 2004-05-14 00:51:42 Re: [PERFORM] Quad processor options - summary