select * from dict where word in (select substr('moon', 0, generate_series(3,length('moon')))) -- this is my X above OR word like 'moon%' -- this is my Y above
Hi. I notice that when I do a WHERE x, Postgres uses an index, and when I do WHERE y, it does so as well, but when I do WHERE x OR y, it doesn't. Why is this so?