Subject | Re: [ib-support] Re: Index, several fields |
---|---|
Author | Martijn Tonies |
Post date | 2003-05-12T12:19:57Z |
Hi,
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com
See you at the First European Firebird Conference in May in Fulda, Germany
http://www.firebird-conference.com
> If I then have a rather large table (2 mio+ records) where is often doNo, as the fields aren't used to compare a value.
> a select with the where claus:
>
> where
> (((MyField1*100)+MyField2))>SomeValue
>
> would I then gain something by either:
>
> 1.
> Making a compined index on those two fields alone ?
> Like this:
>
> create index MyIdx
> on MyTable (MyField1,MyField2);
> 2.Yes.
> Make a new field in the table which is just a calculated fields
> ((MyField1*100)+MyField2) and then make an index on this new field ?
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com
See you at the First European Firebird Conference in May in Fulda, Germany
http://www.firebird-conference.com
>
> Michael
>
>
> --- In ib-support@yahoogroups.com, "Martijn Tonies" <m.tonies@u...> wrote:
> > Hi,
> >
> > > Can I make a index on two fields in a table, where the condition is
> > > something like this:
> > >
> > > create index MyIdx
> > > on MyTable (((MyField1*100)+MyField2));
> >
> > No.