![]() |
MobilityDB 1.3
|
Functions for gathering statistics from temporal alphanumeric columns. More...
#include "pg_temporal/temporal_analyze.h"
#include <assert.h>
#include <postgres.h>
#include <fmgr.h>
#include <utils/typcache.h>
#include <meos.h>
#include <meos_internal.h>
#include "temporal/temporal.h"
#include "pg_temporal/meos_catalog.h"
#include "pg_temporal/span_analyze.h"
#include "pg_temporal/temporal.h"
Macros | |
#define | TEMPORAL_WIDTH_THRESHOLD 4096 |
Functions | |
Datum | temporal_analyze (FunctionCallInfo fcinfo, void(*func)(VacAttrStats *, AnalyzeAttrFetchFunc, int, double)) |
Generic analyze function for temporal columns. More... | |
Datum | Temporal_analyze (PG_FUNCTION_ARGS) |
Compute the statistics for temporal columns where only the time dimension is considered. More... | |
static void | temporal_compute_stats (VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, int samplerows, double totalrows UNUSED) |
Compute statistics for alphanumeric temporal columns. More... | |
static void | temporal_extra_info (VacAttrStats *stats) |
Collect extra information about the temporal type and its base and time types. More... | |
Variables | |
TemporalAnalyzeExtraData * | temporal_extra_data |
Functions for gathering statistics from temporal alphanumeric columns.
Various kind of statistics are collected for both the value and the time dimension of temporal types. Please refer to the PostgreSQL file pg_statistic_d.h for more information about the statistics collected.
stakind
contains the type of statistics which is STATISTIC_KIND_VALUE_BOUNDS_HISTOGRAM
.staop
contains the "<" operator of the value dimension.stavalues
stores the histogram of spans for the value dimension.numvalues
contains the number of buckets in the histogram.stakind
contains the type of statistics which is STATISTIC_KIND_VALUE_LENGTH_HISTOGRAM
.staop
contains the "<" operator to the value dimension.stavalues
stores the length of the histogram of spans for the value dimension.numvalues
contains the number of buckets in the histogram.stakind
contains the type of statistics which is STATISTIC_KIND_TIME_BOUNDS_HISTOGRAM
.staop
contains the "<" operator of the time dimension.stavalues
stores the histogram of periods for the time dimension.numvalues
contains the number of buckets in the histogram.stakind
contains the type of statistics which is STATISTIC_KIND_TIME_LENGTH_HISTOGRAM
.staop
contains the "<" operator of the time dimension.stavalues
stores the length of the histogram of periods for the time dimension.numvalues
contains the number of buckets in the histogram.In the case of temporal types having a timestamptz span as bounding box, that is, tbool and ttext, no statistics are collected for the value dimension and the statistics for the temporal dimension are stored in slots 1 and 2.