Re: [PERFORM] How to get explain plan to prefer Hash Join

2015-03-12 Thread atxcanadian
Sorry about that, excel clipped off the dates. -- View this message in context: http://postgresql.nabble.com/How-to-get-explain-plan-to-prefer-Hash-Join-tp5841450p5841633.html Sent from the PostgreSQL - performance mailing li

Re: [PERFORM] How to get explain plan to prefer Hash Join

2015-03-12 Thread atxcanadian
Here is the output: This is after I've manually ran analyze. -- View this message in context: http://postgresql.nabble.com/How-to-get-explain-plan-to-prefer-Hash-Join-tp5841450p5841610.html Sent from the PostgreSQL - perform

Re: [PERFORM] How to get explain plan to prefer Hash Join

2015-03-12 Thread atxcanadian
Isn't a random_page_cost of 1 a little aggressive? We are currently setup on Amazon SSD with software RAID 5. -- View this message in context: http://postgresql.nabble.com/How-to-get-explain-plan-to-prefer-Hash-Join-tp5841450p5841605.html Sent from the PostgreSQL - performance mailing list ar

Re: [PERFORM] How to get explain plan to prefer Hash Join

2015-03-11 Thread atxcanadian
So I implemented two changes. - Moved random_page_cost from 1.1 to 2.0 - Manually ran analyze on all the tables *Here is the new explain analyze:* QUERY PLAN HashAggregate (cost=74122.97..74125.53 rows=256 width=24) (actual time=45.205..45.211 rows=24 loops=1) InitPlan 1 (returns $0) ->

[PERFORM] How to get explain plan to prefer Hash Join

2015-03-11 Thread atxcanadian
Currently seeing massive increase in performance when optimizer chooses Hash Join over Nested Loops. I achieve this by temporarily setting nested loops off. I'd like to setup some database variables where the optimizer prefers hash joins. Any suggestions? *Query in question:* explain analyze selec