Re: Index Ignored Due To Use Of View

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David Johnston" <polobo(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Index Ignored Due To Use Of View
Date: 2011-02-25 05:32:55
Message-ID: 10646.1298611975@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"David Johnston" <polobo(at)yahoo(dot)com> writes:
> Now, if I simply replace the original FROM clause with the view definition
> (i.e., SELECT * FROM (SELECT ... ) alias WHERE ) I get:
> [ a different plan ]
> I now have index scans on both "filetaskinstance" and "filereference" - but
> all I appeared to do is the same as what rule re-writing should have done.

If you really just manually plugged in the view definition, then yeah
you should have gotten the same results. Could we see a complete test
case?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Bruss 2011-02-25 05:43:27 Re: pg_dump makes our system unusable - any way to pg_dump in the middle of the day? (postgres 8.4.4)
Previous Message John R Pierce 2011-02-25 04:22:03 Re: pg_dump makes our system unusable - any way to pg_dump in the middle of the day? (postgres 8.4.4)