ST_Estimated_Extent for large tables can be faster, since it uses cached statistics from the last VACUUM ANALYZE. The time difference is not evident with only a few rows of data.
Also, ST_Estimated_Extent only works on tables, and not VIEWs (an error is returned). I had to overwrite the ST_Estimated_Extent function to use ST_Extent on one server that uses the AutoCAD Map 3D FDO PostGIS Provider, since it had the ST_Estimated_Extent command hard-wired in the layer-load for both views and tables (resulting in instability AutoCAD). -Mike On 27 June 2010 23:32, nguyen liem <liemnguye...@gmail.com> wrote: > Hi All, > > I have 2 queries: > SELECT ST_Extent(point) FROM schema.mytable; > SELECT ST_Estimated_Extent('schema', 'mytable', 'point'); > > 2 queries above were returned for me same result (BOX2D): > "BOX(11.1806726455688 55.3748893737793,24.1317653656006 67.8551025390625)" > I don't know what is the different between 2 functions, should I use > ST_Extent or ST_Estimated_Extent in this case. > And ... Will be better, if you explain me when we need to use ST_Extent and > when we need to use ST_Estimated_Extent ;) > > Cheers. > > -- > Liem Nguyen > Developer > Axon Active Corp. > ---------------------------------------------------------------------------- > Direct Line : +84 38 948 4645 > Fax : +84 38 811 3489 > Mobile Phone : +84 168 994 8897 > Skype ID : liemnguyendl2204 > Email : liem.ngu...@axonactive.net / liemnguye...@gmail.com > Web Site : http://axonactive.vn > Address : 87 Thang Long Street,Gate 2 Ward 4, > Tan Binh District, HCM city, Vietnam. > > > _______________________________________________ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users