Fastest way to seach for a a string inside a VVarChar field

Stan Busk maxprog at mac.com
Mon Jan 26 15:13:12 CST 2009


Hi,

I have a table with a VVarChar field that contains list of values that  
way '<1> <2> <3> <4> <5>...<9999999>'
It is indexed by word.

To look for a single value like '<3>' I simply use LIKE '%<3>%' or  
REGEX '<3>'.
Which is faster? Or is it similar?

My second question is, is there a way to look for several values using  
REGEX?
For example looking for records where my field contains '<1>', '<3> or  
'<5>'?

REGEX '<1>|<3>|<5>' seems to be working in Valentina Studio.

I am looking for the fastest way to do that as I have to search for  
several of those values in hundreds of thousands of records.

And my very last question, despite all those Regexes work on Valentina  
Studio, should I escape '<' and '>'?
REGEX '\<4\>|\<\3\>|\<2\>' or it is not necessary?

Stan


More information about the Valentina mailing list