pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: Imai, Yoshikazu <imai.yoshikazu@jp.fujitsu.com>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: speeding up planning with partitions
Date: Fri, 22 Feb 2019 10:59:32 -0600
Message-ID: <20190222165932.GG28750@telsasoft.com> (raw)
In-Reply-To: <35b02675-83c2-a12b-961a-fec249b06f35@lab.ntt.co.jp>
References: <CAKJS1f9XAePd2+8F4=wtHKdDdckgKcSoXb-ZbU8Wbt86mhLxKA@mail.gmail.com>
	<b8a139b8-2f5d-6079-67b2-99957af3fc36@lab.ntt.co.jp>
	<7453.1550518972@sss.pgh.pa.us>
	<0a70234e-b2e6-debc-2fb5-e8fd927caa00@lab.ntt.co.jp>
	<1002.1550596071@sss.pgh.pa.us>
	<30961.1550609873@sss.pgh.pa.us>
	<250c61bc-479c-92f4-d19d-d768e3bcdcbc@lab.ntt.co.jp>
	<13510.1550677844@sss.pgh.pa.us>
	<a47e6214-bd46-ab4b-2f84-f9f726e04642@lab.ntt.co.jp>
	<35b02675-83c2-a12b-961a-fec249b06f35@lab.ntt.co.jp>

On Fri, Feb 22, 2019 at 09:45:38PM +0900, Amit Langote wrote:
> I have updated the inheritance expansion patch.
> 
> Patch 0001 rewrites optimizer/utils/inherit.c, so that it allows

Thanks for your continued work on this.

I applied v23 patch and imported one of our customers' schema, and ran explain
on a table with 210 partitions.  With patch applied there are 10x fewer system
calls, as intended.

with patch:
    173 pread64
     76 lseek
     47 open
     38 brk

without patch:
   1276 lseek
    693 pread64
    647 open
    594 brk

> +		if (IS_SIMPLE_REL(rel1) && child_rel1 == NULL)
> +			child_rel1 = build_dummy_partition_rel(root, rel1, baserel1,
> +												   cnt_parts);
> +		if (IS_SIMPLE_REL(rel1) && child_rel2 == NULL)
> +			child_rel2 = build_dummy_partition_rel(root, rel2, baserel2,
> +												   cnt_parts);

Should 2nd "if" say IS_SIMPLE_REL(rel2) ?

Justin




view thread (265+ messages)  latest in thread

Message-ID: <20190222165932.GG28750@telsasoft.com>
Permalink:  ../20190222165932.GG28750@telsasoft.com/
Also on:    postgresql.org/message-id/20190222165932.GG28750@telsasoft.com

 · 

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: pryzby@telsasoft.com, Langote_Amit_f8@lab.ntt.co.jp, tgl@sss.pgh.pa.us, david.rowley@2ndquadrant.com, imai.yoshikazu@jp.fujitsu.com, amitlangote09@gmail.com, alvherre@2ndquadrant.com
  Subject: Re: speeding up planning with partitions
  In-Reply-To: <20190222165932.GG28750@telsasoft.com>

* 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