PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized_analyze_nd()

Datum gserialized_analyze_nd ( PG_FUNCTION_ARGS  )

Definition at line 1910 of file gserialized_estimate.c.

1911 {
1912  VacAttrStats *stats = (VacAttrStats *)PG_GETARG_POINTER(0);
1913  Form_pg_attribute attr = stats->attr;
1914 
1915  POSTGIS_DEBUG(2, "gserialized_analyze_nd called");
1916 
1917  /* If the attstattarget column is negative, use the default value */
1918  /* NB: it is okay to scribble on stats->attr since it's a copy */
1919  if (attr->attstattarget < 0)
1920  attr->attstattarget = default_statistics_target;
1921 
1922  POSTGIS_DEBUGF(3, " attribute stat target: %d", attr->attstattarget);
1923 
1924  /* Setup the minimum rows and the algorithm function.
1925  * 300 matches the default value set in
1926  * postgresql/src/backend/commands/analyze.c */
1927  stats->minrows = 300 * stats->attr->attstattarget;
1928  stats->compute_stats = compute_gserialized_stats;
1929 
1930  POSTGIS_DEBUGF(3, " minrows: %d", stats->minrows);
1931 
1932  /* Indicate we are done successfully */
1933  PG_RETURN_BOOL(true);
1934 }
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...

References compute_gserialized_stats().

Here is the call graph for this function: