Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > query performan...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 15376 of 17602
Post > Topic >>

query performance

by brian.cox@[EMAIL PROTECTED] (Brian Cox) Apr 23, 2008 at 12:37 PM

I have a largish (pg_dump output is 4G) database. The query:

select count(*) from some-table

was taking 120 secs to re****t that there were 151,000+ rows.
This seemed very slow. This db gets vacuum'd regularly (at least once
per day). I also did a manual 'vacuum analyze', but after it completed,
the query ran no faster. However, after dumping the database and 
recreating it
from the backup, the same query takes 2 secs.

Why the dramatic decrease? Would 'vacuum full' have achieved the
same performance improvements? Is there anything else that needs to be
done
regularly to  prevent this performance degradation?

postgresql 8.1.3 running on redhat es 4.

Thanks,
Brian


-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 2 Posts in Topic:
query performance
brian.cox@[EMAIL PROTECTE  2008-04-23 12:37:35 
Re: query performance
tgl@[EMAIL PROTECTED] (T  2008-04-23 16:42:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 18:36:19 CST 2008.