Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: NULL or 0 for a "FLAG_COLUMN"

Re: NULL or 0 for a "FLAG_COLUMN"

From: Brian Peasland <dba_at_nospam.peasland.net>
Date: Thu, 7 Sep 2006 12:52:05 GMT
Message-ID: <J583qz.CrE@igsrsparc2.er.usgs.gov>


> 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" - Unknown
Received on Thu Sep 07 2006 - 07:52:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US