how to index on a column for is not null query in oracle?
问题 I have a table with a lot of column and my query is like this select * from ( select my_table_id from my_table where start_time_local>=? and type_pk<>? and rule_pk=? and this_.name is not null order by start_time_gmt desc ) where rownum <= ? If I create an index on (start_time_local, type_pk, rule_pk, name) it will be inefficient because name is a varchar(1024). Is there a better way to index on something like: (start_time_local, type_pk, rule_pk, isNotNull(name)) Thanks, 回答1: Generally, the