Re: Limiting the number of parameterized indexpaths created

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Limiting the number of parameterized indexpaths created
Date: 2012-10-31 19:58:52
Message-ID: CA+U5nMKb5jo_OM0sjwA8RH5ne-gvjhCUgFTa2W5+uKZEberpGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 31 October 2012 19:44, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Before 9.2, we didn't have this problem in this guise because we didn't
> generate parameterized paths bottom-up; instead, given that we had
> already decided to join t2 and t3 for some reason, we would look to see
> what indexpaths we could make for t1 using values from t2 and/or t3.
> However, that approach had big problems of its own: it couldn't find
> plans that involved pushing parameters down through an intervening join.

Given that most joins patterns are repeated consistently across
multiple SQL statements, is it possible to pre-calculate paths at
ANALYZE time, or perhaps cache them (persistently?) when first
generated? That way we just look up best paths, which would make join
planning much faster.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-10-31 20:02:42 Re: foreign key locks
Previous Message Tom Lane 2012-10-31 19:44:19 Re: Limiting the number of parameterized indexpaths created