Re: Our trial to TPC-DS but optimizer made unreasonable plan

From: Greg Stark <stark(at)mit(dot)edu>
To: Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Our trial to TPC-DS but optimizer made unreasonable plan
Date: 2015-08-13 11:08:16
Message-ID: CAM-w4HM9USjC-gWRaDGBgZOxD20sF_-X6arit62kufUZZ3xvyA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 13, 2015 at 2:49 AM, Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kouhei Kaigai 2015-08-13 11:23:19 Re: Our trial to TPC-DS but optimizer made unreasonable plan
Previous Message Syed, Rahila 2015-08-13 10:12:04 Re: [PROPOSAL] VACUUM Progress Checker.