Du kan oprette et funktionsbaseret indeks i Oracle, der udnytter det faktum, at NULL-værdier ikke gemmes i b-tree-indekser. Noget lignende
CREATE INDEX TimeSeriesPeriodSs1
ON TimeSeriesPeriod(
(CASE WHEN completionStatus = 'Complete' AND validationStatus = 'Pending'
THEN validationStatus
ELSE NULL
END),
(CASE WHEN completionStatus = 'Complete' AND validationStatus = 'Pending'
THEN completionStatus
ELSE NULL
END)
);