In Oracle
, NULL
values are not indexed, i. e. this query:
SELECT *
FROM table
WHERE column IS NULL
will always use full table scan since index doesn't cover the values you need.
More than that, this query:
SELECT column
FROM table
ORDER BY
column
will also use full table scan and sort for same reason.
If your values don't intrinsically allow NULL
's, then mark the column as NOT NULL
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…