34#ifndef __TPOINT_SELFUNCS_H__
35#define __TPOINT_SELFUNCS_H__
39#include <catalog/pg_statistic.h>
40#include <utils/selfuncs.h>
42#include "general/meos_catalog.h"
76#define MIN_DIMENSION_WIDTH 0.000000001
78#define STATISTIC_KIND_ND 102
79#define STATISTIC_KIND_2D 103
80#define STATISTIC_SLOT_ND 0
81#define STATISTIC_SLOT_2D 1
86#define DEFAULT_ND_SEL 0.0001
87#define DEFAULT_ND_JOINSEL 0.001
92#define FALLBACK_ND_SEL 0.2
93#define FALLBACK_ND_JOINSEL 0.3
99 int mode,
bool only_parent);
double float8
Definition: c.h:570
meosOper
Enumeration that defines the classes of Boolean operators used in MobilityDB.
Definition: meos_catalog.h:107
unsigned int Oid
Definition: postgres_ext.h:31
N-dimensional statistics structure.
Definition: tpoint_analyze.h:79
Structure to represent spatiotemporal boxes.
Definition: meos.h:107
float8 geo_sel(VariableStatData *vardata, const STBox *box, meosOper oper)
Return an estimate of the selectivity of a spatiotemporal search box by looking at data in the ND_STA...
Definition: tpoint_selfuncs.c:491
ND_STATS * pg_get_nd_stats(const Oid tableid, AttrNumber att_num, int mode, bool only_parent)
Pull the stats object from the PgSQL system catalogs.
Definition: tpoint_selfuncs.c:721
float8 geo_joinsel(const ND_STATS *s1, const ND_STATS *s2)
Given two statistics histograms, what is the selectivity of a join driven by the && operator?
Definition: tpoint_selfuncs.c:755
ND_STATS * pg_nd_stats_from_tuple(HeapTuple stats_tuple, int mode)
Get the statistics from the tuple.
Definition: tpoint_selfuncs.c:690