Re: Execution plan changed after upgrade from 7.3.9 to 8.2.3

Поиск
Список
Период
Сортировка
От
Тема Re: Execution plan changed after upgrade from 7.3.9 to 8.2.3
Дата
Msg-id 45F698F4.8030601@leroymerlin.fr
обсуждение исходный текст
Ответ на Re: Execution plan changed after upgrade from 7.3.9 to 8.2.3  (Richard Huxton <dev@archonet.com>)
Ответы Re: Execution plan changed after upgrade from 7.3.9 to 8.2.3  ("Dave Dutcher" <dave@tridecap.com>)
Re: Execution plan changed after upgrade from 7.3.9 to 8.2.3  (Richard Huxton <dev@archonet.com>)
Список pgsql-performance
Thanks for the update.

The following did not change anything in the execution plan

ALTER TABLE lm05_t_tarif_panneau ALTER COLUMN lrg_min SET STATISTICS 1000
ALTER TABLE lm05_t_tarif_panneau ALTER COLUMN lrg_max SET STATISTICS 1000
ANALYZE lm05_t_tarif_panneau

I was able to improve response time by creating indexes, but I would
like to avoid changing the database structure because it is not
maintained by ourseleves, but by the  third party vendor.



Richard Huxton wrote:
> vincent.moreau@leroymerlin.fr wrote:
>> I have attached the requested information.
>>
>> You will see that the query is quite messy and could be easily improved.
>> Unfortunately, it came from a third party application and we do not
>> have access to the source code.
>
> ->  Hash Join  (cost=6.31..3056.17 rows=116 width=47) (actual
> time=60.055..70.078 rows=48 loops=280)
>     Hash Cond: (g.cod_modele = a.cod_modele)
>     ->  Seq Scan on lm05_t_tarif_panneau g  (cost=0.00..2977.08
> rows=19097 width=43) (actual time=0.008..67.670 rows=4062 loops=280)
>
> It does seem to be running that sequential scan 280 times, which is a
> strange choice to say the least.
>
> Obvious thing #1 is to look at I'd say is the stats on lrg_min,lrg_max
> - try something like:
> ALTER TABLE lm05_t_tarif_panneau ALTER COLUMN lrg_min SET STATISTICS <n>
> You can set <n> up to 1000 (and then the same for lrg_max of course).
> Analyse the table again and see if that gives it a clue.
>
> Second thing might be to try indexes on lrg_min and lrg_max and see if
> the bitmap code in 8.2 helps things.
>
> Very strange plan.


Ce message et toutes les pièces jointes sont établis à l'attention exclusive de leurs destinataires et sont
confidentiels.Si vous recevez ce message par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur.
L'internetne permettant pas d'assurer l'intégrité de ce message, le contenu de ce message ne représente en aucun cas un
engagementde la part de Leroy Merlin. 


В списке pgsql-performance по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Execution plan changed after upgrade from 7.3.9 to 8.2.3
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: Postgres batch write very slow - what to do