MobilityDB 1.3
Loading...
Searching...
No Matches
Macros | Functions | Variables
temporal_analyze.c File Reference

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

TemporalAnalyzeExtraDatatemporal_extra_data
 

Detailed Description

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.

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.