Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Fast bitwise search
Connor McDonald wrote:
> Richard Kuhler wrote: >
> > > Lets says its 20 attributes, each being boolean. A b-tree index isn't > going to help since the cardinality is so low.
That's an over simplification. Especially with a bitmask where you are looking for rows with bits set. What if only 1 row in a 100 million row table has the attribute value you are looking for? Even if you forget about histograms, you can use a null-or-set design to create an index that will just have the rows that have the attribute set.
> So you might indeed be up for a full scan no matter what, at which > point, a bit mask in a single column may indeed be the best way to go
Sure, but should we design a data model purely so it gives the best performance possible? When does usability come into the equation?
-- Richard KuhlerReceived on Wed Jun 02 2004 - 09:38:44 CDT