aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gin/ginbulk.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-10-17 20:52:32 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2010-10-17 20:52:32 -0400
commit48c7d9f6ff99714495b7d6d2ebc44fbbe992cc8f (patch)
tree73082c19da244fedf1bfc81d5c5eb2a1f3eddd9e /src/backend/access/gin/ginbulk.c
parentcd0e8253216907982fe369b91f6d788d699b6c47 (diff)
downloadpostgresql-48c7d9f6ff99714495b7d6d2ebc44fbbe992cc8f.tar.gz
postgresql-48c7d9f6ff99714495b7d6d2ebc44fbbe992cc8f.zip
Improve GIN indexscan cost estimation.
The better estimate requires more statistics than we previously stored: in particular, counts of "entry" versus "data" pages within the index, as well as knowledge of the number of distinct key values. We collect this information during initial index build and update it during VACUUM, storing the info in new fields on the index metapage. No initdb is required because these fields will read as zeroes in a pre-existing index, and the new gincostestimate code is coded to behave (reasonably) sanely if they are zeroes. Teodor Sigaev, reviewed by Jan Urbanski, Tom Lane, and Itagaki Takahiro.
Diffstat (limited to 'src/backend/access/gin/ginbulk.c')
0 files changed, 0 insertions, 0 deletions