Jeremy Finzel <finz...@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


Reply via email to