Skip site navigation (1) Skip section navigation (2)

Re: [PERFORM] select query takes 13 seconds to run with index

From: PFC <lists(at)peufeu(dot)com>
To: mark <markkicks(at)gmail(dot)com>, Justin <justin(at)emproshunts(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] select query takes 13 seconds to run with index
Date: 2008-05-27 08:19:37
Message-ID: op.ubsz2zqmcigqcu@apollo13.peufeu.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-performance
>> The estimate is way off, when was the last time Vaccum was on the table?
> about a week ago i ran this VACUUM VERBOSE ANALYZE;
> this table is never updated or deleted, rows are just inserted...

	You should analyze it more often, then... Postgres probably thinks the  
table has the same data distribution as last week !
	Analyze just takes a couple seconds...

>> Load on the database
> how do i measure load on database?

	Just look at vmstat.

	Also if you very often do SELECT .. WHERE x = ... ORDER BY id DESC you'll  
benefit from an index on (x,id) instead of just (x).



In response to

pgsql-performance by date

Next:From: hubert depesz lubaczewskiDate: 2008-05-27 08:22:01
Subject: Re: [PERFORM] select query takes 13 seconds to run with index
Previous:From: markDate: 2008-05-27 03:12:26
Subject: Re: select query takes 13 seconds to run with index

pgsql-general by date

Next:From: hubert depesz lubaczewskiDate: 2008-05-27 08:22:01
Subject: Re: [PERFORM] select query takes 13 seconds to run with index
Previous:From: Volkan YAZICIDate: 2008-05-27 06:39:37
Subject: Permission Problem for DELETE

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group