首页 > 解决方案 > 带有“不包含”的 Oracle 文本非常慢

问题描述

我有一张包含数百万条记录的表格,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)

第一个直接查询在几分之一秒内执行,第二个需要几分钟。

有什么解决办法吗?

标签: oracleoracle-text

解决方案


推荐阅读