Re: Joining views disables indexes? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Joining views disables indexes?
Date
Msg-id 29380.1130887724@sss.pgh.pa.us
Whole thread Raw
In response to Joining views disables indexes?  (Mitch Pirtle <mitch.pirtle@gmail.com>)
List pgsql-performance
Mitch Pirtle <mitch.pirtle@gmail.com> writes:
> I have a client that is testing an internal data platform, and they
> were happy with PostgreSQL until they tried to join views - at that
> time they discovered PostgreSQL was not using the indexes, and the
> queries took 24 hours to execute as a result.

You'll need to provide some actual details if you want useful comments.
Let's see the table schemas, the view definitions, and the EXPLAIN plan
(I'll spare you a request for EXPLAIN ANALYZE given that it'd take 24
hours to get ;-) ... although some estimate of the number of rows
expected would be helpful).  And I trust they remembered to ANALYZE the
underlying tables first?  Also, which PG version exactly?

            regards, tom lane

pgsql-performance by date:

Previous
From: "Steinar H. Gunderson"
Date:
Subject: Re: Joining views disables indexes?
Next
From: "Qingqing Zhou"
Date:
Subject: Re: performance of implicit join vs. explicit conditions on inet queries?