Re: Performance difference when using views - Mailing list pgsql-performance

From Tom Lane
Subject Re: Performance difference when using views
Date
Msg-id 27481.1099346908@sss.pgh.pa.us
Whole thread Raw
In response to Performance difference when using views  (Alvaro Nunes Melo <al_nunes@atua.com.br>)
List pgsql-performance
Alvaro Nunes Melo <al_nunes@atua.com.br> writes:
> I have some views that are used to make some queries simplest. But when
> I use them there is a performance loss, because the query don't use
> indexes anymore. Below I'm sending the query with and without the view,
> its execution times, explains and the view's body.

It's not the same query, because you are implicitly changing the order
of the LEFT JOINs when you group some of them into a subquery (view).
Join order is significant for outer joins ...

            regards, tom lane

pgsql-performance by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [PATCHES] [HACKERS] ARC Memory Usage analysis
Next
From: Simon Riggs
Date:
Subject: Re: Performance difference when using views