Re: GROUP BY on a large table -- an idea

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: GROUP BY on a large table -- an idea
Дата
Msg-id 4531FC5C.20703@logix-tt.com
обсуждение исходный текст
Ответ на GROUP BY on a large table -- an idea  ("Dawid Kuroczko" <qnex42@gmail.com>)
Список pgsql-hackers
Hi, Dawid,

Dawid Kuroczko wrote:

> The hybrid approach means: sort as much as you can without spilling to
> disk, then aggregate and store aggregate state variables in safe place
> (like a "tree" above), get more tuples from the table, sort them, update
> aggregate state variables, lather, rince, repeat.

For this to work, you need an additional function in the aggregate
definition, that allows to merge two states into one, for the "update
aggregate state variables" step.

Recently, there was some discussion that the Bizgres MPP people already
have such a function for merging states of different backend processes,
and that the query planner could benefit from such a function e. G. in
case of UNION or table partitioning.

Maybe we should come up with an exact definition of syntax and semantics
of this function, that satisfies all the needs of the three usecases above?

Thanks,
Markus

--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] large object regression tests
Следующее
От: Markus Schaber
Дата:
Сообщение: Re: SQL functions, INSERT/UPDATE/DELETE RETURNING, and