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

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: [GENERAL] select query takes 13 seconds to run with index
Дата
Msg-id 20080527145819.GA7691@depesz.com
обсуждение исходный текст
Ответ на Re: [GENERAL] select query takes 13 seconds to run with index  (mark <markkicks@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: mark
Дата:
Сообщение: Re: [GENERAL] select query takes 13 seconds to run with index
Следующее
От: Simon Riggs
Дата:
Сообщение: Outer joins and equivalence