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

Definition at line 1765 of file gserialized_estimate.c.

References compute_gserialized_stats().

1766 {
1767  VacAttrStats *stats = (VacAttrStats *)PG_GETARG_POINTER(0);
1768  Form_pg_attribute attr = stats->attr;
1769 
1770  POSTGIS_DEBUG(2, "gserialized_analyze_nd called");
1771 
1772  /* If the attstattarget column is negative, use the default value */
1773  /* NB: it is okay to scribble on stats->attr since it's a copy */
1774  if (attr->attstattarget < 0)
1775  attr->attstattarget = default_statistics_target;
1776 
1777  POSTGIS_DEBUGF(3, " attribute stat target: %d", attr->attstattarget);
1778 
1779  /* Setup the minimum rows and the algorithm function */
1780  stats->minrows = 300 * stats->attr->attstattarget;
1781  stats->compute_stats = compute_gserialized_stats;
1782 
1783  POSTGIS_DEBUGF(3, " minrows: %d", stats->minrows);
1784 
1785  /* Indicate we are done successfully */
1786  PG_RETURN_BOOL(true);
1787 }
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: