Re: Inherits and "get highest id".

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Inherits and "get highest id".
Дата
Msg-id 20050610122104.GB1365@wolff.to
обсуждение исходный текст
Ответ на Inherits and "get highest id".  (Dawid Kuroczko <qnex42@gmail.com>)
Список pgsql-general
On Fri, Jun 10, 2005 at 12:27:32 +0200,
  Dawid Kuroczko <qnex42@gmail.com> wrote:
>
> In other words -- doing such a one row select means scanning the
> whole partitioned data.  the primaryindex on logid is not used
> anywhere.  Creating view (SELECT * UNION ALL SELECT * UNION ALL....)
> does not help either.
>
> I wonder -- is there any better solution?  selecting highest from each
> table, unioning it and then selecting highest of the highest works
> well but it strikes me as 'not exactly the niciest implementation'
> (one of the reasons is that I have to remembed about it each time
> new table will be added to schema...).
>
> Any comments, hints?

I seem to remember people getting performance by doing union alls of selects
that explicity list the partition condition; as that will let the planner
speed up checks of tables that cannot result in matches.

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

Предыдущее
От: Howard Cole
Дата:
Сообщение: Re: Backup Compatibility between minor versions.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: CREATE TEMP TABLE AS SELECT/ GET DIAGNOSTICS ROW_COUNT