[postgis-users] Is my query planner failing me, or vice versa?

Paul Ramsey pramsey at refractions.net
Tue Dec 13 16:11:16 PST 2005


If your slow result does in fact contain a lot of very large  
geometries, then another possible explanation is that your are  
encountering the "toasted tuples give bad estimates problem".  Large  
tuples are "toasted" and require higher overhead to access than small  
untoasted tuples.  The planner assume everything is untoasted, so a  
large number of toasted tuples in the result set will result in a  
heinous underestimate.

P

On 13-Dec-05, at 2:58 PM, Jessica M Salmon wrote:
>
>                                          postgis_full_version
> ---------------------------------------------------------------------- 
> --------------------------------
>  POSTGIS="1.0.2" GEOS="2.1.3" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS
> DBPROC="0.3.0" RELPROC="0.3.0"
>
> GeomUnion is a major component of the trigger function, but it only  
> is used
> when the query has a result (fires grow together). Such is not the  
> case for
> any of the explain analyze output shown in the chart. I do have some
> massively complex geometries, indeed, but the geometry complexity  
> itself
> does not appear to account for the occasionally much-slower-than- 
> expected
> queries.



More information about the postgis-users mailing list