Re: [HACKERS] TPC-H Q20 from 1 hour to 19 hours! - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: [HACKERS] TPC-H Q20 from 1 hour to 19 hours!
Date
Msg-id CAH2-Wzk0P8QrLQRL_y-huBKNoviDem4qv-2qisqYQcFLSfJuAQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] TPC-H Q20 from 1 hour to 19 hours!  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
On Sun, Jun 11, 2017 at 10:27 AM, Peter Geoghegan <pg@bowt.ie> wrote:
> Note that I introduced a new, redundant exists() in the agg_lineitem
> fact table subquery. It now takes 23 seconds for me on Tomas' 10GB
> TPC-H dataset, whereas the original query took over 90 minutes.
> Clearly we're missing a trick or two here. I think that you need a
> DAG-shaped query plan to make this work well, though, so it is
> certainly a big project.

On closer examination, this seems to be due to the number of heap
accesses required by an index-only scan that the original query plan
uses; my test case was invalid. All the same, I understand that moving
predicates into many (TPC-H) subqueries is an important optimization,
and hope that more work can be done in this area.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: [HACKERS] transition table behavior with inheritance appears broken
Next
From: Tomas Vondra
Date:
Subject: Re: [HACKERS] TPC-H Q20 from 1 hour to 19 hours!