Subject | Re: [firebird-support] Composite Indices |
---|---|
Author | Martijn Tonies |
Post date | 2003-08-29T11:18:49Z |
Hi Rod,
indices to use.
indices have no use.
the "child" table.
You might want to read the help that Craig Stuntz provides with his
PLANalyzer tool:
http://delphi.weblogs.com/IBPLANalyzer
It's written for InterBase, but, of course, applies to Firebird as well.
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com
> >From the good old days of Paradox we still have a lot of CompositeThe Firebird 1.5 optimizer does a better job in choosing the right
> indices on our relations. (now using FB1.0.3 and IBO 4).
>
> These were useful for setrange / findkey etc. Now that we have got
> rid of this sort of code and are using queries - I have a few
> questions.
>
> 1) The optimizer will ofter choose a composite index over a single
> column index - e.d index(accnum) vs index(accnum,date). Is this a
> problem, or in firebird has the index just build it's info on the
> first column anyway?
indices to use.
> (I will remove the composite indexes in time- but there may be someYes, as Firebird can combine indices. Mind you, low-selectivity
> legacy code hiding somewhere)
>
> 2) Is splitting a composite index into separate indices better ?
indices have no use.
> 3) Is a FK constraint on a join table a better index than creating anA FK constraint will automatically add an index to the columns in
> index on the join table ? (In terms of performance - not integrity)
the "child" table.
> 4) the RDB$Selectivity column - I read a value of 1 or greater meansMore info required I believe.
> the index is inefficient - true / false - more info required ?
You might want to read the help that Craig Stuntz provides with his
PLANalyzer tool:
http://delphi.weblogs.com/IBPLANalyzer
It's written for InterBase, but, of course, applies to Firebird as well.
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com