Re: Database design question
Posted in 1996
David Williams <djw@smooth1.demon.co.uk> wrote: :In article <329854CA.45D@netcomuk.co.uk>, Neil Truby :<ntruby@netcomuk.co.uk> writes :>Thanks to those who responded to my specific query last time. I'm going :>to ask the same question in the abstract: :> :>say I have a table with a million rows. One column is an indicator, :>which will almost always be null. However, it is *very* important to be :>able to quicly identify the 5 rows (out of the million) that have the :>indicator set. Some DBMSs, Adabas for example, would allow the column :>to be set up as a "null-suppressed index", that is, only non-null values :>would have an index entry built for them. This is extremely efficient. :> :>How would you do it in a relational design? :> :>Thanks :>Neil Truby :>Chase Bank :>Bournemouth, UK : You can not. The best method for highly duplicate values is Sybase's : bit-wise indicies (Gulp! Sorry - had to say it as it it true). : Informix will have them in later releases. There is a still better solution for this problem in Universal Server where you can have function based indexes. In this case it will enable indexes much like the "null-suppressed index" mentioned for Adabas, but it will also enable a lot of other types of indexes. Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org