OSDN Git Service

Initialize reltuples = 1000, relpages = 10 in a newly created
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 15 Apr 1999 04:08:07 +0000 (04:08 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 15 Apr 1999 04:08:07 +0000 (04:08 +0000)
commit0c0151a3ec78a3e17200e816c02508d9269b68d7
tree91e144aeb1f23236908f7f6c6779ec979922347e
parentdbce02f133ebe6a503b06edc6ba1357b9896fa29
Initialize reltuples = 1000, relpages = 10 in a newly created
relation, rather than zeroes.  This prevents the optimizer from making
foolish choices (ie, using nested-loop plans) on never-yet-vacuumed tables.
This is a hack, of course.  Keeping accurate track of these statistics
would be a cleaner solution, but it's far from clear that it'd be worth
the cost of doing so.  In any case we're not going to do that for 6.5.
In the meantime, this quick hack provides a useful performance improvement
in the regression tests and in many real-world scenarios.
src/backend/catalog/heap.c