1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-25 13:17:41 +03:00

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.
This commit is contained in:
Tom Lane
1999-08-01 04:54:25 +00:00
parent f851c6b07d
commit 44878506d8
5 changed files with 542 additions and 206 deletions

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: vacuum.h,v 1.22 1999/07/15 15:21:03 momjian Exp $
* $Id: vacuum.h,v 1.23 1999/08/01 04:54:25 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -67,22 +67,23 @@ typedef struct
guess2,
max,
min;
int16 best_len,
int best_len,
guess1_len,
guess2_len,
max_len,
min_len;
int32 best_cnt,
long best_cnt,
guess1_cnt,
guess1_hits,
guess2_hits,
null_cnt,
nonnull_cnt;
int32 max_cnt,
nonnull_cnt,
max_cnt,
min_cnt;
FmgrInfo f_cmpeq,
f_cmplt,
f_cmpgt;
Oid op_cmplt;
regproc outfunc;
bool initialized;
} VacAttrStats;