Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: NULL or 0 for a "FLAG_COLUMN"
> You should also keep in mind that NULLs can never be indexed; which could
> lead to performance issues.
NULLs will not be indexed. But in the OP's case, the only two values would be 0 and 1. Would an index really help in this case? It depends on the data distribution. If we have an even distribution (50% 0's and 50% 1's), then an index would not help. If we assume a really skewed distribution (5% 0's and 95% 1's) then an index would only help when searching for the value with the lowest cardinality (0 in this example).
Cheers,
Brian
-- =================================================================== Brian Peasland dba_at_nospam.peasland.net http://www.peasland.net Remove the "nospam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" - UnknownReceived on Thu Sep 07 2006 - 07:52:05 CDT
![]() |
![]() |