Subject | Re: [firebird-support] Ignore nulls in index? |
---|---|
Author | Kjell Rilbe |
Post date | 2011-02-17T12:29:39Z |
Mark Rotteveel skriver:
allows a lot of tweaking and I could modify the model to get the mapping
you describe. I will have to give this some thought. Thanks for the idea!
Kjell
--
------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
[Non-text portions of this message have been removed]
> > Is it possible to make an index in FB ignore nulls? I mean, can theInteresting proposition. This is a schema from an OO framework, but it
> > index be made to not store in the index those records with null in the
> > indexed field?
> >
> > I have a 150 million table with some fields that will be 99% or more
> > null, but in some situations I will have to lookup one specific record
> > based on a non-null value of that field. Seems like such a waste to
> > store all those nulls in the index... Without the index, the query takes
> > about an hour, which is not acceptable.
>
> If 99% of the records do not have this field, would it not make more
> sense to create a separate table for that field(s), and use the record
> ID to join to the full table?
allows a lot of tweaking and I could modify the model to get the mapping
you describe. I will have to give this some thought. Thanks for the idea!
Kjell
--
------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
[Non-text portions of this message have been removed]