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('moon', 0, generate_series(3,length('moon')))) as m
on dict.word = m.substr
where
word in
(select substr('moon', 0, generate_series(3,length('moon'))))
select * from dict
inner join (select substr('moon', 0, generate_series(3,length('moon')))) as m
on dict.word = m.substr
Is one preferred?