Re: plan time of MASSIVE partitioning ...

Поиск
Список
Период
Сортировка
От Boszormenyi Zoltan
Тема Re: plan time of MASSIVE partitioning ...
Дата
Msg-id 4CBD9DDC.4040304@cybertec.at
обсуждение исходный текст
Ответ на Re: plan time of MASSIVE partitioning ...  (Boszormenyi Zoltan <zb@cybertec.at>)
Ответы Re: plan time of MASSIVE partitioning ...  (Boszormenyi Zoltan <zb@cybertec.at>)
Список pgsql-hackers
Hi,

attached is a WIP patch against 9.1 current GIT that converts
eq_classes and canon_pathkeys in PlannerInfo.

Also attached is the test case again the slow query is:

explain select * from inh_parent
where timestamp1 between '2010-04-06' and '2010-06-25'
order by timestamp2;

There is intentionally no data, the planning time is slow.
The currect GIT version plans this query in 2.4 seconds,
the patched version does it in 0.59 seconds according to
gprof. The gprof outputs are also attached.

There is one problem with the patch, it doesn't survive
"make check". One of the regression tests fails the
    Assert(!cur_em->em_is_child);
line in process_equivalence() in equivclass.c, but I couldn't
yet find it what causes it. The "why" is vaguely clear:
something modifies the ec_members list in the eq_classes'
tree nodes while the node is in the tree. Because I didn't find
the offender yet, I couldn't fix it, so I send this patch as is.
I'll try to fix it if someone doesn't beat me in fixing it. :)

The query produces the same EXPLAIN output for both the
stock and the patched version, they were checked with diff.
I didn't attach it to this mail because of the size constraints.
Almost all files are compressed because of this.

Best regards,
Zoltán Böszörményi

--
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de
     http://www.postgresql.at/


Вложения

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

Предыдущее
От: KaiGai Kohei
Дата:
Сообщение: Re: leaky views, yet again
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Extensions, this time with a patch