On Tue, 2008-09-02 at 12:05 +0100, Gregory Stark wrote:
> I wonder if it would be more worthwhile to remove them and have a
> subsequent phase where we look for possible joins to *add*. So even if
> the user writes
> "select * from invoices where customer_id=?" the planner might be able
> to discover that it can find those records quicker by scanning
> customer, finding the matching <company_id,customer_id> and then using
> an index to look them up in invoices.
That's a good idea.
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support