34#ifndef __TSPATIAL_SELFUNCS_H__
35#define __TSPATIAL_SELFUNCS_H__
39#include <catalog/pg_statistic.h>
40#include <utils/selfuncs.h>
42#include "temporal/meos_catalog.h"
75#define MIN_DIMENSION_WIDTH 0.000000001
77#define STATISTIC_KIND_ND 102
78#define STATISTIC_KIND_2D 103
79#define STATISTIC_SLOT_ND 0
80#define STATISTIC_SLOT_2D 1
85#define DEFAULT_ND_SEL 0.0001
86#define DEFAULT_ND_JOINSEL 0.001
91#define FALLBACK_ND_SEL 0.2
92#define FALLBACK_ND_JOINSEL 0.3
98 int mode,
bool only_parent);
double float8
Definition: c.h:581
meosOper
Enumeration that defines the classes of Boolean operators used in MobilityDB.
Definition: meos_catalog.h:128
unsigned int Oid
Definition: postgres_ext.h:31
N-dimensional statistics structure.
Definition: tspatial_analyze.h:79
Structure to represent spatiotemporal boxes.
Definition: meos.h:134
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: tspatial_selfuncs.c:488
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: tspatial_selfuncs.c:718
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: tspatial_selfuncs.c:751
ND_STATS * pg_nd_stats_from_tuple(HeapTuple stats_tuple, int mode)
Get the statistics from a tuple.
Definition: tspatial_selfuncs.c:687