Prefix vs Wildcard vs Regexp in terms of performance and usability

(Bent Coder) #1


I have queries below which work like SELECT * FROM table WHERE LIKE 'Product1*'. I just want to find out which one would be the best in terms of performance and usability?









(Adrien Grand) #2

All those queries are equally bad: boolean queries with a single clause are rewritten to that clause so wrapping in a bool or filtered query has no effect.

Also prefix, wildcard and regexpqueries all work the same internally by creating an automaton that describes matching terms and intersecting it with the terms dictionary.

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.