Subject Re: [firebird-support] Re: foreign keys ans slow insert
Author Martijn Tonies
> > >Well, i use lookups inside the application (Delphi) so can put the
> > >checks inside the middle tier in ASTA, and remove that foreign keys.
> > >Can you tell me if the next version of firebird will change that or
> > >remain in the same way?
> >
> >No, I can't tell you that. I only know that Arno is working on a
> >to the problem of long duplicate chains in those low-selectivity indexes.
> >
> >./hb
> Helen,

I hope I can answer as well :-)

> I have found it faster to use as few indices as possible. It speeds up
> query and SP execution time incredibly. Is this anything to do with this
> problem?
> The reason I ask is because, coming from a dBase/Paradox background, I
> thought (in the beginning) that I needed indices for just about
> With Firebird, I've learned not to put in indices.

Well, as far as I remember, with dBase/Paradox, you will also use
indices to set the sorting order. This isn't needed with Firebird.
In general, I always tell people that indices are for _filtering_ the
resultset. If you want to have CUSTOMER WHERE ID = 10
then an index helps, speeding up that lookup a lot.

Ordering should be done via ORDER BY <something>

That being said, currently, an index CAN be used to returns the
first few rows as soon as possible, without the need to fetch the
entire resultset (server side) and sort it. This, however, is only
useful, IMO, for largish resultsets.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Upscene Productions