Re: [postgis-users] whats the different between ST_Extent() and ST_Estimated_Extent()

2010-06-28 Thread Mike Toews
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  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


Re: [postgis-users] Wondering why I can't use the geometry type in a CREATE statement.

2010-06-28 Thread Greg Militello
Stephen,

Had to fix the typos, but this does seem to work.   thanks.   Here is the 
updated SQL:

CREATE TABLE parks (
  park_idINTEGER,
  park_name  VARCHAR,
  park_date  DATE,
  park_type  VARCHAR,
  park_geom  geometry,
  CONSTRAINT enforce_dims_park_geom CHECK (st_ndims(park_geom) = 2),
  CONSTRAINT enforce_geotype_park_geom CHECK (geometrytype(park_geom) = 
'MULTIPOLYGON'::text OR park_geom IS NULL),
  CONSTRAINT enforce_srid_park_geom CHECK (st_srid(park_geom) = 4326)
);

-Greg

On Jun 27, 2010, at 11:14 PM, Stephen Woodbridge wrote:

> CREATE TABLE parks (
>   park_idINTEGER,
>   park_name  VARCHAR,
>   park_date  DATE,
>   park_type  VARCHAR,
>   park_geom  geomtery,
>   CONSTRAINT enforce_dims_park_geom CHECK (st_ndims(park_geom) = 2),
>   CONSTRAINT enforce_geotype_park_geom CHECK (geometrytype(park_geom) = 
> 'MULTIPOLYGON'::text OR the_geom IS NULL),
>   CONSTRAINT enforce_srid_park_geom CHECK (st_srid(park_geom) = 4326)
> );

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] whats the different between ST_Extent() and ST_Estimated_Extent()

2010-06-28 Thread Nicolas Ribot
> 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  ;)
>

According to the doc, estimated_extent only looks at the table
statistics and does not compute the real extent of the column. (ie, if
stats are not up-to-date, the result may not be accurate).

Nicolas
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Which naming convention to use

2010-06-28 Thread Nicolas Ribot
I would say PostgreSQL/Postgis, as postgis is an extension to postgresql.

Nicolas

On 24 June 2010 16:32, Sindile Bidla  wrote:
> When talking about Postgis and PostgreSQL which is the correct:
> Postgis/PostgreSQL or PostgreSQL/Postgis.
>
> --
> Sent from my mobile device
>
> Sindile Bidla
> Tel: 0823408538
> Fax: 0865246419
> ___
> 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