Re: inputs into query planner costing

From: Mike Roest <mike(dot)roest(at)replicon(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: inputs into query planner costing
Date: 2015-03-31 19:22:31
Message-ID: CAE7Byhiyj7j=rQgYxGaVqtRemraOVMsPCU7-t0oX4uxEB=PjwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Fabio Ugo Venchiarutti 2015-03-31 20:28:14 Re: Partial index-based load balancing
Previous Message zach cruise 2015-03-31 18:56:04 Re: how would you speed up this long query?