我有一张包含数百万条记录的表格,Oracle Text 完美无缺。
select * from table1 where contains(col1, 'some text') > 0
但如果我添加not
它会变得非常慢。
select * from table1 where contains(col1, 'some text') > 0 and (not contains(col1, 'some text') > 0)
或者
select * from table1 where contains(col1, 'some text') > 0 and (
contains(col1, 'some text') = 0)
第一个直接查询在几分之一秒内执行,第二个需要几分钟。
有什么解决办法吗?