Does Oracle have a filtered index concept?

You can create a function-based index in Oracle that leverages the fact that NULL values aren't stored in b-tree indexes. Something like.

You can create a function-based index in Oracle that leverages the fact that NULL values aren't stored in b-tree indexes. Something like 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) ).

Damn, foiled agin... – Alex Poole May 9 '11 at 17:14.

You might be able to use a function-based index for this, though it isn't very pleasant for this scenario: create index TimeSeriesPeriodSs1 on TimeSeriesPeriod ( case when validationStatus= N'Pending' and completionStatus= N'Complete' then validationStatus else null end, case when validationStatus= N'Pending' and completionStatus= N'Complete' then completionStatus else null end); You'd have to make the query's where clause match exactly to make it use the index though. Select from TimeSeriesPeriod where case when validationStatus= N'Pending' and completionStatus= N'Complete' then validationStatus else null end = N'Pending' and case when validationStatus= N'Pending' and completionStatus= N'Complete' then completionStatus else null end = N'Complete'; This would be a lot neater if you can define (deterministic) functions to do the case. See here for some further info and examples.

Or this, from a quick Google.

1 +1 for including where clause to use the function based index. This is a big difference in using SQL Server's filtered index versus Oracle's function based index. – Shannon Severance May 9 '11 at 18:51.

Here's a small variant on Justin and Alex's answer that might save further index space and makes the modified query more readable IMO: CREATE INDEX TimeSeriesPeriodSs1 ON TimeSeriesPeriod( (CASE WHEN completionStatus = 'Complete' AND validationStatus = 'Pending' THEN 1 ELSE NULL END); SELECT * FROM TimeSeriesPeriod WHERE 1 = (CASE WHEN completionStatus = 'Complete' AND validationStatus = 'Pending' THEN 1 ELSE NULL END).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions


Thank You!
send