From: Tom Lane <tgl@sss.pgh.pa.us>
To: mehdirahbvd@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15102: Performance problem when doing join, index are not used
Date: Thu, 08 Mar 2018 10:41:04 -0500
Message-ID: <12626.1520523664@sss.pgh.pa.us> (raw)
In-Reply-To: <152052183493.4972.11853150375334373737@wrigleys.postgresql.org>
References: <152052183493.4972.11853150375334373737@wrigleys.postgresql.org>
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> Here is the query:
> [ select with 11 input tables ]
Perhaps raising join_collapse_limit to 11 or more would let the query
planner find a better plan. Having said that, I see no especially good
reason to think that sort-and-merge isn't a good join type for this query.
Indexes aren't always the answer, especially not when joining large
numbers of rows as you are here.
Another direction to pursue is to raise work_mem to allow the sorts to
proceed more efficiently. Don't go overboard on that, but judicious
increases can help.
Lastly, I see no reason whatever to think this is a bug. You might
have better luck discussing the issue on the pgsql-performance list.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, mehdirahbvd@gmail.com
Subject: Re: BUG #15102: Performance problem when doing join, index are not used
In-Reply-To: <12626.1520523664@sss.pgh.pa.us>
References: <152052183493.4972.11853150375334373737@wrigleys.postgresql.org> <12626.1520523664@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox