]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Improve database performance for partial indexes on boolean columns (bug 587028 in...
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Jun 2010 03:29:03 +0000 (03:29 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Jun 2010 03:29:03 +0000 (03:29 +0000)
commit28df5614f0d849c8edb0bca71f9e7dc0107e9344
treedc0dbff9f2502d73a32a546ba5b551b081a9f64e
parent8629860dee7d2a39115b3acb1341c321ab62adc4
Improve database performance for partial indexes on boolean columns (bug 587028 in Launchpad)

PostgreSQL 8.3/8.4 treats "IS FALSE" and "= FALSE" expressions differently,
which can have a significant impact on database performance if an index is
created with one and a query uses the other. This patch addresses all existing
partial indexes on boolean columns to enable the query planner to use an index
scan whether the query uses either expression.

Thanks to James Fournie of BC Sitka for noticing the problem with the index
on asset.copy and opening bug 587028 in Launchpad with the suggested fix!

git-svn-id: svn://svn.open-ils.org/ILS/trunk@16588 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/010.schema.biblio.sql
Open-ILS/src/sql/Pg/011.schema.authority.sql
Open-ILS/src/sql/Pg/040.schema.asset.sql
Open-ILS/src/sql/Pg/upgrade/0291.schema.boolean_indexes.sql [new file with mode: 0644]