Re: [HACKERS] Runtime Partition Pruning
Jesper Pedersen <jesper.pedersen@redhat.com>
From: Jesper Pedersen <jesper.pedersen@redhat.com>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>,
Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>,
Beena Emerson <memissemerson@gmail.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>, Robert Haas
<robertmhaas@gmail.com>, amul sul <sulamul@gmail.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Dilip Kumar <dilipbalaut@gmail.com>
Date: 2018-04-03T17:44:37Z
Lists: pgsql-hackers
Attachments
- hash.sql (application/sql)
- select.sql (application/sql)
- std.sql (application/sql)
Hi David,
On 03/31/2018 09:52 AM, David Rowley wrote:
> I've attached a new version of the patch. I'm now at v18 after having
> some versions of the patch that I didn't release which were based on
> various versions of Amit's faster partition pruning patch.
>
Thank you for the updated patch set !
I have tested this together with Amit's v46 patch.
The attached case doesn't trigger a generic plan, so basically all time
is spent in GetCachedPlan.
The standard table case (std.sql) gives:
generic_cost = 8.4525
avg_custom_cost = 13.4525
total_custom_cost = 67.2625
whereas the 64 hash partition case (hash.sql) gives:
generic_cost = 540.32
avg_custom_cost = 175.9425
total_custom_cost = 879.7125
I tested with pgbench -M prepared -f select.sql.
Also, I'm seeing a regression for check-world in
src/test/regress/results/inherit.out
***************
*** 642,648 ****
---------------------+---+---+-----
mlparted_tab_part1 | 1 | a |
mlparted_tab_part2a | 2 | a |
! mlparted_tab_part2b | 2 | b | xxx
mlparted_tab_part3 | 3 | a | xxx
(4 rows)
--- 642,648 ----
---------------------+---+---+-----
mlparted_tab_part1 | 1 | a |
mlparted_tab_part2a | 2 | a |
! mlparted_tab_part2b | 2 | b |
mlparted_tab_part3 | 3 | a | xxx
(4 rows)
I'll spend some more time tomorrow.
Thanks for working on this !
Best regards,
Jesper
Commits
-
Initialize ExprStates once in run-time partition pruning
- 1957f8dabf8d 11.0 landed
-
Add bms_prev_member function
- 5c0675215e15 11.0 landed
-
Support partition pruning at execution time
- 499be013de65 11.0 landed
-
Document partprune.c a little better
- 971d7ddbe19a 11.0 landed
-
Fix crash in pg_replication_slot_advance
- 6f1d723b6359 11.0 cited
-
Add parallel-aware hash joins.
- 1804284042e6 11.0 cited
-
Fix typo.
- 487a0c1518af 11.0 cited
-
Allow --with-bonjour to work with non-macOS implementations of Bonjour.
- 9b9cb3c4534d 11.0 cited
-
Mention need for --no-inc-recursive in rsync command
- 2c74e6c1dcc5 11.0 cited