Re: [SQL] inner join is much faster! is that right?

2006-09-19 Thread James Im
I was doing the explain thing when I discovered my mistake! The think is that I over simplyfied my examples. instead of searching for one ID, I was searching for several ids and I forgot to put a parentesis arround the or like this. I was doing this: select * from file a, file_tag b, tag c where

[SQL] inner join is much faster! is that right?

2006-09-19 Thread James Im
I really thought that Postgresql would rewrite a query from select * from file a, file_tag b, tag c where a.id_file=b.id_file and b.id_tag=c.id_tag and a.id_file=100100 to something like: select * from (file a inner join file_tag b on (a.id_file=b.id_file)) inner join tag c on (b.id_tag