How can I optimise, index or rewrite the following query so that it's fast?
SELECT * FROM roads WHERE "some text oxford street blah blah" ILIKE "%"||road_name||"%"
Needless to say there are millions of road records and the query is taking ages. How can we better set this up?
Maybe I'm looking at this the wrong way?
Thanks