-
- Downloads
Support min/max index optimizations on boolean columns.
Since bool_and() is equivalent to min(), and bool_or() to max(), we might as well let them be index-optimized in the same way. The practical value of this is debatable at best, but it seems nearly cost-free to enable it. Code-wise, we need only adjust the entries in pg_aggregate. There is a measurable planning speed penalty for a query involving one of these aggregates, but it is only a few percent in simple cases, so that seems acceptable. Marti Raudsepp, reviewed by Abhijit Menon-Sen
Showing
- src/include/catalog/catversion.h 1 addition, 1 deletionsrc/include/catalog/catversion.h
- src/include/catalog/pg_aggregate.h 3 additions, 3 deletionssrc/include/catalog/pg_aggregate.h
- src/test/regress/expected/opr_sanity.out 18 additions, 12 deletionssrc/test/regress/expected/opr_sanity.out
- src/test/regress/sql/opr_sanity.sql 2 additions, 2 deletionssrc/test/regress/sql/opr_sanity.sql
Loading
Please register or sign in to comment