Search question involving "NOT" and "-"

Post Reply
jkj2001
Posts: 142
Joined: Fri Mar 29, 2002 1:39 pm

Search question involving "NOT" and "-"

Post by jkj2001 »

Hi everyone,

We've got a user who runs this query:

select count(*) from mytable where myfield like 'mary -david'

They get 500,000 hits in short order.

This next search takes a long time to return, however, and I'm not 100% sure why:

select count(*) from mytable where myfield like 'mary' and myfield not like 'david'

Does use of the NOT operator mean linear searching is in play?

Here's the index statement we've put on the field, in case it helps:


set keepnoise='on';set delexp=0;set addexp='\alnum{1,99}';set addexp='>>\alpha{1,50},=\alpha{1,50}';create metamorph inverted index idxmmytable_myfield on mytable(myfield);


We've using Texis for Solaris, version 4.00.1019027849. Thanks for helping clear me up on this.
jkj2001
Posts: 142
Joined: Fri Mar 29, 2002 1:39 pm

Search question involving "NOT" and "-"

Post by jkj2001 »

Cool, thanks John!
Post Reply