Re: [GENERAL] Understanding INNER JOIN versus IN subquery

2009-07-20 Thread Grzegorz Jaśkiewicz
On Mon, Jul 20, 2009 at 2:37 PM, Robert James wrote: > I have two queries which should be equivalent.  The Planner plans them > differently, although they are both about the same time.  Can someone > explain why? > select word from dict > where >  word in >  (select substr('moon', 0, generate_serie

Re: [GENERAL] Understanding INNER JOIN versus IN subquery

2009-07-20 Thread Greg Stark
On Mon, Jul 20, 2009 at 2:37 PM, Robert James wrote: > I have two queries which should be equivalent.  The Planner plans them > differently, although they are both about the same time.  Can someone > explain why? Uhm, please post the two plans and the server version. I know you've posted them bef

[GENERAL] Understanding INNER JOIN versus IN subquery

2009-07-20 Thread Robert James
I have two queries which should be equivalent. The Planner plans them differently, although they are both about the same time. Can someone explain why? select word from dict where word in (select substr('moon', 0, generate_series(3,length('moon' select * from dict inner join (select substr