Page 1 of 1
TSQL Limit
Posted: Wed Jul 30, 2003 1:37 pm
by gazim
As far as I know , tsql like/likep has a limit of 100 words per like. Is there such a limit if I run a search using OR and Like? Just to clarify, I used "(fld like word1 OR field like word2 OR field like wordn...)" instead of "fld like (word1,word2,word3,......wordn)". I had 101 ORs but it returned 100 hits. Is it because there's a limit of 100 ORs in tsql?
TIA.
TSQL Limit
Posted: Wed Jul 30, 2003 3:08 pm
by Kai
You're correct that there is a 100-term limit for a set in Metamorph (a single LIKE/LIKEP). There's no limit to the number of ORs, but there is a limit of 8192 bytes for the overall SQL command text (not including $-parameters in Vortex), in tsql or Vortex.
However, keep in mind that a large OR is going to take longer to run than the equivalent single-LIKE paren list, because the index must be re-opened and scanned for each LIKE.
Getting fewer rows back that OR clauses could be because some of the terms were found in the same row.
TSQL Limit
Posted: Thu Jul 31, 2003 3:17 pm
by jkj2001
As an aside, could using the paren list (word,word2,word3) lead to different results due to postprocessing issues?
In other words, would the OR searches use postprocessing while the paren list wouldn't?
We have the "allow postprocessing" apicp flag turned on in our scripts, so I'd think postprocessing would happen in both cases, just want your opinion.
What about from a tsql command line-- do OR and paren lists each use postprocessing?
TSQL Limit
Posted: Thu Jul 31, 2003 3:50 pm
by mark
post processing would not affect anything in those contexts. post processing is used based on query terms and index expressions not use of OR or parens.
tsql has no query protection enabled, only vortex does.