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)
commit6dd5edec001df3718bf967c3ef4cd8dc66e0b423
tree00bf0c5645a3d7cb3500e944c1b159e22b5ab926
parent45814e6b40837bae576e10e7b294b3c4734a9a2b
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