Re: Query performance with disabled hashjoin and mergejoin

Поиск
Список
Период
Сортировка
От Ivan Voras
Тема Re: Query performance with disabled hashjoin and mergejoin
Дата
Msg-id e6e9216e-9330-4b91-bbe6-c6baab0778d6@email.android.com
обсуждение исходный текст
Ответ на Re: Query performance with disabled hashjoin and mergejoin  (Greg Smith <greg@2ndquadrant.com>)
Список pgsql-performance
Sorry for the misunderstaning: of course not default "normal" settings; shared buffers, work mem, wal segments and others have been tuned according to available hardware (e.g. 4 GB, 32 MB, 10 for these settings, respectively). I meant "planner default settings" in the post.
--
Sent from my Android phone, please excuse my brevity.

Greg Smith <greg@2ndquadrant.com> wrote:
Ivan Voras wrote: > The "vanilla" plan, with default settings is: Pause here for a second: why default settings? A default PostgreSQL configuration is suitable for systems with about 128MB of RAM. Since you say you have "good enough hardware", I'm assuming you have a bit more than that. The first things to try here are the list at http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server ; your bad query here looks like it might benefit from a large increase to effective_cache_size, and possibly an increase to work_mem as well. Your "bad" plan here is doing a lot of sequential scans instead of indexed lookups, which makes me wonder if the change in join types you're forcing isn't fixing that part as a coincidence. Note that the estimated number of rows coming out of each form of plan is off by a factor of about 200X, so it's not that the other plan type is better estimating anything. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us "PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books

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

Предыдущее
От: Mikkel Lauritsen
Дата:
Сообщение: Different execution plans for semantically equivalent queries
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Does auto-analyze work on dirty writes? (was: Re: [HACKERS] Slow count(*) again...)