Re: inner join is much faster! is that right?
От | James Im |
---|---|
Тема | Re: inner join is much faster! is that right? |
Дата | |
Msg-id | BAY7-F27352E5152460F67D8E96896220@phx.gbl обсуждение исходный текст |
Ответ на | inner join is much faster! is that right? ("James Im" <im-james@hotmail.com>) |
Список | pgsql-sql |
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 a.id_file=b.id_file and b.id_tag=c.id_tag and a.id_file=10000001000000 or a.id_file=10000001000200 But I should have done this: 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=10000001000000 or a.id_file=10000001000200) This changes everything. The performance is now acceptable! _________________________________________________________________ V�lg selv hvordan du vil kommunikere - skrift, tale, video eller billeder med MSN Messenger: http://messenger.msn.dk/ - her kan du det hele
В списке pgsql-sql по дате отправления: