PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ gserialized_analyze_nd()

Datum gserialized_analyze_nd ( PG_FUNCTION_ARGS  )

Definition at line 1858 of file gserialized_estimate.c.

References compute_gserialized_stats().

Referenced by compute_gserialized_stats().

1859 {
1860  VacAttrStats *stats = (VacAttrStats *)PG_GETARG_POINTER(0);
1861  Form_pg_attribute attr = stats->attr;
1862 
1863  POSTGIS_DEBUG(2, "gserialized_analyze_nd called");
1864 
1865  /* If the attstattarget column is negative, use the default value */
1866  /* NB: it is okay to scribble on stats->attr since it's a copy */
1867  if (attr->attstattarget < 0)
1868  attr->attstattarget = default_statistics_target;
1869 
1870  POSTGIS_DEBUGF(3, " attribute stat target: %d", attr->attstattarget);
1871 
1872  /* Setup the minimum rows and the algorithm function.
1873  * 300 matches the default value set in
1874  * postgresql/src/backend/commands/analyze.c */
1875  stats->minrows = 300 * stats->attr->attstattarget;
1876  stats->compute_stats = compute_gserialized_stats;
1877 
1878  POSTGIS_DEBUGF(3, " minrows: %d", stats->minrows);
1879 
1880  /* Indicate we are done successfully */
1881  PG_RETURN_BOOL(true);
1882 }
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:
Here is the caller graph for this function: