Re: [GENERAL] select query takes 13 seconds to run with index - Mailing list pgsql-performance

From hubert depesz lubaczewski
Subject Re: [GENERAL] select query takes 13 seconds to run with index
Date
Msg-id 20080527145819.GA7691@depesz.com
Whole thread Raw
In response to Re: [GENERAL] select query takes 13 seconds to run with index  (mark <markkicks@gmail.com>)
List pgsql-performance
On Tue, May 27, 2008 at 07:46:05AM -0700, mark wrote:
> and then it became super fast!! thanks a lot!!!
> my question:
> -> is 500 too high? what all does this affect?

i usually dont go over 100. it affects number of elements in statistics
for fields. you can see the stats in:
select * from pg_stats;

> -> now increasing this number does it affect only when i am running
> analyze commands, or will it slow down inserts and other operations?
> EXPLAIN ANALYZE select * from pokes where uid = 578439028 order by id
> desc limit 6;

it (theoretically) can slow down selects to to the fact that it now has
to load more data to be able to plan (i.e. it loads the statistics, and
since there are more values - the statistics are larger).

generally - in most cases this shouldn't be an issue.

additionally - i think that the 2-column index would work in this
particular case even better.

regards,

depesz

pgsql-performance by date:

Previous
From: mark
Date:
Subject: Re: [GENERAL] select query takes 13 seconds to run with index
Next
From: Simon Riggs
Date:
Subject: Outer joins and equivalence