Experts: We have a requirement to get the count of 4 M rows from a specific XML tag with value begins with, I have a text index created but the query is extremely slow when I use the contains operator.
select count(1) from employee
contains ( doc, 'scott% INPATH ( /root/element1/element2/element3/element4/element5)') >0
what is oracle's best practices recommendation to query / index such searches?
Can you provide a test case that shows the structure of the data and how you've generated the index? Otherwise, the generic advice is going to be "use prefix indexing".