Re: inputs into query planner costing

Поиск
Список
Период
Сортировка
От Mike Roest
Тема Re: inputs into query planner costing
Дата
Msg-id CAE7Byhiyj7j=rQgYxGaVqtRemraOVMsPCU7-t0oX4uxEB=PjwA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: inputs into query planner costing  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Thanks for the responses 

For anyone searching in the future I'll answer Tom's questions and list the boneheaded fix that it ended up actually being (really painful as I've been fighting this for a week).

1) According to amazon they run stock postgres as far as the query planner is concerned.
2) Yes sorry I forgot to note on our prod system the random_page_cost was 2 vs 4 on the RDS system.
3) I had run vacuum on all the tables in the query and the pg_relation_size on the tables aren't way out of wack
4) Yep both default_statistics_target was the default of 100 on both.

I was concentrating completely on the wrong direction here.  What it turned out to be was the RDS configuration of postgres which we had modified somewhat I had missed configuring work_mem to something greater then their default of 1 MB.  Once I brought work_mem upto the same value as our production server low and behold the query runs fast.

Sorry for wasting everyones time.  Hopefully this will help someone else down the line.

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

Предыдущее
От: zach cruise
Дата:
Сообщение: Re: how would you speed up this long query?
Следующее
От: Fabio Ugo Venchiarutti
Дата:
Сообщение: Re: Partial index-based load balancing