От: Richard Kojedzinszky
Тема: query optimization
Дата: ,
Msg-id: alpine.DEB.2.02.1204241008570.9591@krichy.tvnetwork.hu
(см: обсуждение, исходный текст)
Ответы: Re: query optimization  ("Kevin Grittner")
Re: query optimization  (Tom Lane)
Список: pgsql-performance

Скрыть дерево обсуждения

query optimization  (Richard Kojedzinszky, )
 Re: query optimization  ("Kevin Grittner", )
 Re: query optimization  (Tom Lane, )
  Re: query optimization  (Thomas Kellerer, )
   Re: query optimization  (Tom Lane, )
    Re: query optimization  (Andrew Dunstan, )
  Re: query optimization  (Richard Kojedzinszky, )

Dear list,

We have a database schema, which looks the same as the attached script.

When filling the tables with data, and skipping analyze on the table (so
pg_stats contains no records for table 'a'), the first select in the
script runs fast, but after an analyze the planner decides to sequence
scan tables b and c, thus making the query much slower. Can somebody help
me solving this issue, or tuning our installation to not to use sequence
scans in this case?

Thanks in advance,


Kojedzinszky Richard
Euronet Magyarorszag Informatikai Zrt.

Вложения

В списке pgsql-performance по дате сообщения:

От: Tom Lane
Дата:
Сообщение: Re: Weird plan variation with recursive CTEs
От: AI Rumman
Дата:
Сообщение: NOT EXISTS or LEFT JOIN which one is better?