First step in fixing selectivity-estimation code. eqsel and
Tom Lane <tgl@sss.pgh.pa.us>
First step in fixing selectivity-estimation code. eqsel and neqsel now behave as per my suggestions in pghackers a few days ago. selectivity for < > <= >= should work OK for integral types as well, but still need work for nonintegral types. Since these routines have never actually executed before :-(, this may result in some significant changes in the optimizer's choices of execution plans. Let me know if you see any serious misbehavior. CAUTION: THESE CHANGES REQUIRE INITDB. pg_statistic table has changed.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/vacuum.c | modified | +46 −22 |
| src/backend/utils/adt/selfuncs.c | modified | +445 −158 |
| src/include/catalog/pg_statistic.h | modified | +33 −9 |
| src/include/commands/vacuum.h | modified | +6 −5 |
| src/include/utils/builtins.h | modified | +5 −5 |