pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Imai Yoshikazu <yoshikazu_i443@live.jp>
Cc: jesper.pedersen@redhat.com <jesper.pedersen@redhat.com>
Cc: Imai, Yoshikazu <imai.yoshikazu@jp.fujitsu.com>
Cc: 'Amit Langote' <amitlangote09@gmail.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: speeding up planning with partitions
Date: Tue, 26 Mar 2019 18:26:31 -0400
Message-ID: <15573.1553639191@sss.pgh.pa.us> (raw)
In-Reply-To: <19f54c17-1619-b228-10e5-ca343be6a4e8@lab.ntt.co.jp>
References: <CAKJS1f9XAePd2+8F4=wtHKdDdckgKcSoXb-ZbU8Wbt86mhLxKA@mail.gmail.com>
	<0F97FA9ABBDBE54F91744A9B37151A5129DD55@g01jpexmbkw24>
	<256b9c87-b687-6f51-6274-19ae5743aef6@lab.ntt.co.jp>
	<0F97FA9ABBDBE54F91744A9B37151A5129E604@g01jpexmbkw24>
	<9feacaf6-ddb3-96dd-5b98-df5e927b1439@lab.ntt.co.jp>
	<0F97FA9ABBDBE54F91744A9B37151A512B3279@g01jpexmbkw24>
	<0c90ce90-b010-4791-41c0-a0df34f99ffa@lab.ntt.co.jp>
	<0F97FA9ABBDBE54F91744A9B37151A512B3528@g01jpexmbkw24>
	<d964510e-2eec-ce42-8ad8-884caf718e03@lab.ntt.co.jp>
	<0F97FA9ABBDBE54F91744A9B37151A512B359C@g01jpexmbkw24>
	<72094fc9-3232-0fc7-b7cd-42e1c73d5aee@lab.ntt.co.jp>
	<0F97FA9ABBDBE54F91744A9B37151A512B45CD@g01jpexmbkw24>
	<53a80692-c68d-5e11-1014-6441b6e8ca5a@redhat.com>
	<BYAPR20MB22790FAFA860B03602A9A7B4BC420@BYAPR20MB2279.namprd20.prod.outlook.com>
	<d04c7027-2df8-bbd5-9a8f-9806e3ab3270@lab.ntt.co.jp>
	<c8dcf0fd-! 4759-5e1c-ea67-e2d3f98e81bd@lab.ntt.co.jp>
	<20519.1553288822@sss.pgh.pa.us>
	<19f54c17-1619-b228-10e5-ca343be6a4e8@lab! .ntt.co.jp>

Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
> On 2019/03/23 6:07, Tom Lane wrote:
>> I also feel like you used a dartboard while deciding where to insert the
>> call in query_planner(); dropping it into the middle of a sequence of
>> equivalence-class-related operations seems quite random.  Maybe we could
>> delay that step all the way to just before make_one_rel, since the other
>> stuff in between seems to only care about baserels?  For example,
>> it'd certainly be better if we could run remove_useless_joins before
>> otherrel expansion, so that we needn't do otherrel expansion at all
>> on a table that gets thrown away as being a useless join.

> create_lateral_join_info() expects otherrels to be present to propagate
> the information it creates.

Sure, but the actually-useful work in that function is just concerned
with baserels.  The only thing it does with otherrels is to propagate
parents' lateral-ref info to children, which is a lot easier, cheaper,
and more reliable if we let build_simple_rel do it.  See the version
of 0001 I just pushed.

I'll look at 0003 and up tomorrow.

			regards, tom lane





view thread (265+ messages)  latest in thread

Message-ID: <15573.1553639191@sss.pgh.pa.us>
Permalink:  ../15573.1553639191@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15573.1553639191@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Langote_Amit_f8@lab.ntt.co.jp, yoshikazu_i443@live.jp, jesper.pedersen@redhat.com, imai.yoshikazu@jp.fujitsu.com, amitlangote09@gmail.com, david.rowley@2ndquadrant.com, alvherre@2ndquadrant.com, robertmhaas@gmail.com, pryzby@telsasoft.com
  Subject: Re: speeding up planning with partitions
  In-Reply-To: <15573.1553639191@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