| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
| Cc: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
| Subject: | Re: TPC-H Q20 from 1 hour to 19 hours! |
| Date: | 2017-06-11 17:36:50 |
| Message-ID: | 26968.1497202610@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Peter Geoghegan <pg(at)bowt(dot)ie> writes:
> On Thu, Jun 1, 2017 at 8:40 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> The thing that would actually have a chance of improving matters for Q20
>> would be if we could see our way to looking through the aggregation
>> subquery and applying the foreign key constraint for lineitem. That
>> seems like a research project though; it's surely not happening for v10.
> Do you mean teaching the optimizer to do something like this?:
Uh, no. I don't think we want to add any run-time checks. The point in
this example is that we'd get a better rowcount estimate if we noticed
that the FK constraint could be considered while estimating the size of
the partsupp-to-aggregated-subquery join.
> Apparently selectivity estimation isn't particularly challenging with
> the TPC-H queries.
Maybe not with the rest of them, but we're certainly having an issue there
with Q20.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Geoghegan | 2017-06-11 17:54:53 | Re: TPC-H Q20 from 1 hour to 19 hours! |
| Previous Message | Peter Geoghegan | 2017-06-11 17:27:16 | Re: TPC-H Q20 from 1 hour to 19 hours! |