Re: significant slow down with various LIMIT

Поиск
Список
Период
Сортировка
От norn
Тема Re: significant slow down with various LIMIT
Дата
Msg-id f4ecdf51-a74f-45f7-9b6d-87244787ca6b@x3g2000yqd.googlegroups.com
обсуждение исходный текст
Ответ на Re: significant slow down with various LIMIT  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: significant slow down with various LIMIT
Список pgsql-performance
Kevin,
I appreciate your help very much!

> Since the LIMIT 3 and LIMIT 4 queries generated exactly the same
> plan, the increased time for LIMIT 4 suggests that there are 3
> matching rows which are near the end of the index it is scanning, but
> the fourth one is much farther in.
Yes, you are right, I checked id of the rows and found that problem
occurred when one of id is 1377077 and next one is 132604.
This table was modified with several new rows and the problem now
happens between limit 4 and 5, this is another evidence of your
rightness!

Followed by your advices I set the following:
effective_cache_size=6144MB
random_page_cost=0.25
seq_page_cost = 0.25
max_connections = 50 # thanks for pointing! I don't really need so
much

> > 2 SATA 750GB (pg db installed in software RAID 0)
>
> You do realize that if either drive dies  you lose all your data on
> that pair of drives, right?  I hope the value of the data and well
> tested backup procedures keeps the loss to something which is
> acceptable.
Thanks for attention! I have some regular backup procedures already,
so there are no extra risk related to drive failure...

I restarted Postgresql with new settings and got no performance
improvements in this particular query...
Do you have ideas how much random_page_cost and seq_page_cost should
be decreased?
Also I wish to notice, that I made REINDEX DATABASE while tried to
solve the problem by myself.. this doesn't help...


В списке pgsql-performance по дате отправления:

Предыдущее
От: RD黄永卫
Дата:
Сообщение: How to diagnose a “context-switching ” storm problem ?
Следующее
От: Sergey Konoplev
Дата:
Сообщение: Re: [PERFORM] How to diagnose a “context-switching ” storm problem ?