Re: Aggregate not using BRIN index on timestamp

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Aggregate not using BRIN index on timestamp
Дата
Msg-id 12589.1565014830@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Aggregate not using BRIN index on timestamp  (Jeremy Finzel <finzelj@gmail.com>)
Ответы Re: Aggregate not using BRIN index on timestamp  (Jeremy Finzel <finzelj@gmail.com>)
Список pgsql-general
Jeremy Finzel <finzelj@gmail.com> writes:
> I have a very large table with 4 billion rows and a BRIN index on timestamp
> spanning from 2013 to present.  I am running this simple query:
> SELECT MIN(created_at) FROM table;
> It is choosing a parallel seq scan as opposed to a BRIN bitmap scan.

> I can provide more info.  But first - am I missing something obvious?

Yes: BRIN indexes don't provide any ordering information.  A btree
index on created_at could be used to optimize this query, but without
one of those, seqscanning the whole table is the only possibility.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: why toasted is created when domain is used ?
Следующее
От: Jeremy Finzel
Дата:
Сообщение: Re: Aggregate not using BRIN index on timestamp