[postgis-users] Slow select from big table

Tomeh, Husam htomeh at firstam.com
Wed Jun 6 08:50:18 PDT 2007


 
Before postgres 8, count(*) query is known to be slow; however, starting from postgres 8, the count and and most aggregate queries run much faster - Thanks to the core developers for fixing it.
 
--
  Husam

________________________________

From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Rob Tester
Sent: Wednesday, June 06, 2007 8:23 AM
To: 'PostGIS Users Discussion'
Subject: RE: [postgis-users] Slow select from big table



Sounds more like a question for the general group.  But, have you run a vacuum analyze on the table ?

 

From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Matt Doughty
Sent: Wednesday, June 06, 2007 8:19 AM
To: postgis-users at postgis.refractions.net
Cc: Sergio Jorrín Abellán
Subject: [postgis-users] Slow select from big table

 

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

 

GEOGRAMA S.L.

Tel.:  +34 945 13 13 72    652 77 14 15

Fax: +34 945 23 03 40 

www.geograma.com

 

 


**********************************************************************
This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged.  If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited.  If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.

Thank you.

                                   FADLD Tag
**********************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070606/34ed8ca5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3743 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070606/34ed8ca5/attachment.jpg>


More information about the postgis-users mailing list