我有一个简单的查询
select round(sum(a.wt)) as a_wt
from db.abc a
where a.date is null
and a.col_no is not null
and a.pod_cd = '367'
and a.fant != a.rce
并且我想完全删除表访问权限。有3个索引,与下面的列组合类似,>]
我有一个简单的查询,从db.abc a中选择round(sum(a.wt))作为a_wt,其中a.date为null且a.col_no不为null且a.pod_cd ='367'和a.fant! = a.rce,我想删除表访问权限...
一个选项是创建Function Based Index
通常,索引不索引空值,因此像]这样的条件>
select round(sum(wt)) as a_wt
from abc
where nvl("date",date'1900-01-01') = date'1900-01-01' -- matching means "date" column is null assuming there exists no records with this ancient date.
and nvl(col_no,0) != 0 -- non-matching means "col_no" column is not null
and pod_cd = 367
and fant != rce
索引可用于检查空值,并将两列相互比较。