Analyze makes queries slow...

Поиск
Список
Период
Сортировка
От Stef
Тема Analyze makes queries slow...
Дата
Msg-id 20030811155841.483ffd93.svb@ucs.co.za
обсуждение исходный текст
Ответы Re: Analyze makes queries slow...  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Analyze makes queries slow...  (Jacek Rembisz <jr178783@zodiac.mimuw.edu.pl>)
Список pgsql-performance
Hi all,

I posted this problem on the sql list, and was referred to this list in stead.
I have attached an sql statement that normally runs under 3 minutes.
That is, until I vacuum analyze the database (or just the tables in the query),
then the same query runs longer than 12 hours, and I have to kill it.

However 90% of queries are faster after analyzing on this database,
there are two or three, including this one that takes for ever.

I have tried to reverse engineer the explain plan from before analyzing,
to come up with an sql statement, using proper joins, to force the planner
to do the original join, but although I came close, I never got the same
result as the original query.

I suspect that this might be caused by some of the crazy indexes that
were built on some of these tables, but I can't really do much about that,
unless I can come up with a very good reason to nuke them.

I also attached the "create table" statements for all the tables, as well
as a row count of each.

Can somebody help me with guidelines or something similar,
to understand exactly what is happening in the explain plan.

TIA
Stefan


Вложения

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

Предыдущее
От: "Shridhar Daithankar"
Дата:
Сообщение: Re: Peformance of Update
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: Perfomance Tuning