Re: Database design question
Posted in 1996
Neil Truby (ntruby@netcomuk.co.uk) wrote: : 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. Uuh. What's wrong with using a 'default' value instead of a NULL? Then the histogram will figure out the data spread, the selectivity of the predicate, and therefore whether to use the index or not? The trouble with bit-mapped indices is that they are only any good for combinations of equal predicates, and don't deal all that well with range queries. -- ===================================================================== Paul Brown ^..^ pbrown@postgres.Berkeley.EDU (oo) - Oink! #include <std_disclaimer.h> "Think global - act loco!" - Zippy the Pinhead =====================================================================