Search Postgresql Archives

Re: Aggregate not using BRIN index on timestamp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeremy Finzel <finzelj@xxxxxxxxx> 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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux