[postgis-users] Slow select from big table

Paul Ramsey pramsey at refractions.net
Wed Jun 6 08:23:56 PDT 2007


count(*) is not a fast operation.  It *is* normal that PgSQL takes a  
long time on it, it's almost a FAQ.  5minutes is little long for only  
3M records, so you might have a poor configuration tuning, but it  
will never be a sub-second operation on a 3M record table.

P

On 6-Jun-07, at 8:18 AM, Matt Doughty wrote:

> Hi List,
>
>
>
> I’ve got a simple question, how can I speed up this query?
>
>
>
> SELECT COUNT (*) FROM table1
>
>
>
> Currently it’s taking a little more than five minutes to run on a  
> table with 3.4 m rows. The table is gist indexed. Is it normal that  
> Postgres takes so long?
>
>
>
> Cheers,
>
>
>
> Matt
>
>
>
>
>
>
>
> Matt Doughty
>
> <image001.jpg>
>
> GEOGRAMA S.L.
>
> Tel.:  +34 945 13 13 72    652 77 14 15
>
> Fax: +34 945 23 03 40
>
> www.geograma.com
>
>
>
>
>
> <image001.jpg>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list