Re: Our trial to TPC-DS but optimizer made unreasonable plan - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Our trial to TPC-DS but optimizer made unreasonable plan
Date
Msg-id CAM-w4HM9USjC-gWRaDGBgZOxD20sF_-X6arit62kufUZZ3xvyA@mail.gmail.com
Whole thread Raw
In response to Our trial to TPC-DS but optimizer made unreasonable plan  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
Responses Re: Our trial to TPC-DS but optimizer made unreasonable plan  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
List pgsql-hackers
On Thu, Aug 13, 2015 at 2:49 AM, Kouhei Kaigai <kaigai@ak.jp.nec.com> wrote:
> In fact, cost of HashJoin underlying Sort node is:
>     ->  Hash Join  (cost=621264.91..752685.48 rows=1 width=132)
>
> On the other hands, NestedLoop on same place is:
>     ->  Nested Loop  (cost=0.00..752732.26 rows=1 width=132)
>
> Probably, small GUC adjustment may make optimizer to prefer HashJoin towards
> these kind of queries.

With that kind of discrepancy I doubt adjusting GUCs will be sufficient

> Do you have a good idea?

Do you have EXPLAIN ANALYZE from the plan that finishes? Are there any
row estimates that are way off?


-- 
greg



pgsql-hackers by date:

Previous
From: "Syed, Rahila"
Date:
Subject: Re: [PROPOSAL] VACUUM Progress Checker.
Next
From: Kouhei Kaigai
Date:
Subject: Re: Our trial to TPC-DS but optimizer made unreasonable plan