PostGIS  2.3.7dev-r@@SVN_REVISION@@
Datum gserialized_analyze_nd ( PG_FUNCTION_ARGS  )

Definition at line 1827 of file gserialized_estimate.c.

References compute_gserialized_stats().

1828 {
1829  VacAttrStats *stats = (VacAttrStats *)PG_GETARG_POINTER(0);
1830  Form_pg_attribute attr = stats->attr;
1831 
1832  POSTGIS_DEBUG(2, "gserialized_analyze_nd called");
1833 
1834  /* If the attstattarget column is negative, use the default value */
1835  /* NB: it is okay to scribble on stats->attr since it's a copy */
1836  if (attr->attstattarget < 0)
1837  attr->attstattarget = default_statistics_target;
1838 
1839  POSTGIS_DEBUGF(3, " attribute stat target: %d", attr->attstattarget);
1840 
1841  /* Setup the minimum rows and the algorithm function */
1842  stats->minrows = 300 * stats->attr->attstattarget;
1843  stats->compute_stats = compute_gserialized_stats;
1844 
1845  POSTGIS_DEBUGF(3, " minrows: %d", stats->minrows);
1846 
1847  /* Indicate we are done successfully */
1848  PG_RETURN_BOOL(true);
1849 }
static void compute_gserialized_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, int sample_rows, double total_rows)
In order to do useful selectivity calculations in both 2-D and N-D modes, we actually have to generat...

Here is the call graph for this function: