All, This is old topic, when I use: select url from urlinfo where url like 'http://www.lycos.de%'; it uses the index, good!
but if I use: select url from urlinfo where url like 'http://%.lycos.de'; it won't use index at all, NOT good! is there any way I can force secon query use index???
I've seen people define a reverse(text) function via plperl or similar then build a functional index on reverse(url). Of course, that would rely on your knowing which end of your search pattern has the % wildcard.
-- Richard Huxton Archonet Ltd
---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match