Re: Indexes
Posted in 1995
In article <DFxFxJ.7u6@nntpa.cb.att.com> ajay@ios.ho.att.com "-A.DANKAR" writes: > What problems, if any, on performance, storage etc. one may face > with an index on a field which can take NULL. Let us assume that > the field is an int or a char type. You can certainly index on a column which contains a NULL, but the real question is 'what's the data distribution like'? If you have a table where *most* occurences of the column contain NULL but a *few* contain values you need to get at directly, I would advise that you append an extra column to the one you first thought of, carefull choosen to have a flat distribution of values, and for lots of different values. This index will be larger but will do the job you require - probably! Use 'set explain on' to help with your problem. -- ============================================================================ Sally Woolrich | This mail contains my personal sally@excelsis.demon.co.uk | views not those of my employer! ============================================================================