Re: [PERFORM] unneeded joins on view

2014-04-16 Thread Linos
On 16/04/14 17:57, Heikki Linnakangas wrote: > On 04/16/2014 06:13 PM, Linos wrote: >> I thought that Postgresql would optimize out joins on columns I >> don't ask for when I use the view but it doesn't, this query: > > It doesn't, because it would be wrong. It still has to check that the tables

Re: [PERFORM] unneeded joins on view

2014-04-16 Thread Heikki Linnakangas
On 04/16/2014 06:13 PM, Linos wrote: I thought that Postgresql would optimize out joins on columns I don't ask for when I use the view but it doesn't, this query: It doesn't, because it would be wrong. It still has to check that the tables have a matching row (or multiple matching rows). If

[PERFORM] unneeded joins on view

2014-04-16 Thread Linos
Hello all, I am trying to simplify some of the queries I use with my database creating a big view of all the possible attributes my items can have, the view is rather large: http://pastebin.com/ScnJ8Hd3 I thought that Postgresql would optimize out joins on columns I don't ask for when I use