PostGIS
2.2.8devr@@SVN_REVISION@@


static 
In order to do useful selectivity calculations in both 2D and ND modes, we actually have to generate two stats objects, one for 2D and one for ND.
You would think that an ND histogram would be sufficient for 2D calculations of selectivity, but you'd be wrong. For features that overlap multiple cells, the ND histogram overestimates the number of hits, and can't contain the requisite information to correct that overestimate. We use the convenient PgSQL facility of stats slots to store one 2D and one ND stats object, and here in the compute function we just call the computation twice, once in each mode. It would be more efficient to have the computation calculate the two histograms simultaneously, but that would also complicate the (already complicated) logic in the function, so we'll take the CPU hit and do the computation twice.
Definition at line 1727 of file gserialized_estimate.c.
References compute_gserialized_stats_mode(), gserialized_analyze_nd(), and PG_FUNCTION_INFO_V1().
Referenced by gserialized_analyze_nd().