R: R: Query plan on identical tables differs . Why ?
От | Fabio Panizzutti |
---|---|
Тема | R: R: Query plan on identical tables differs . Why ? |
Дата | |
Msg-id | 000f01c4398f$1a20cbc0$3c02020a@ufficio обсуждение исходный текст |
Ответ на | Re: R: Query plan on identical tables differs . Why ? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-performance |
>>>-----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
В списке pgsql-performance по дате отправления: