Alvaro Nunes Melo <al_nunes@xxxxxxxxxxx> 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