Subject Re: [firebird-support] Re: Performance troubles
Author Martijn Tonies
> > Thanks but it doesn't seem to work fast enough. So I keep to the
> other
> > suggestions.
> >
> > It seems like firebird prefers joins made with explicitely use of
> join
> > rather than the implicit call in my code and the code above.
> >
>
> Yup, my goal was not about show fastest.
> i wanted to give you some performance triks about FB.
> If a simple query takes some hours, it mean there is index problem
> or too many re-reads over data or index pages.

OR that a query is "suboptimal".

I believe the query from the original poster means that for each
new value in "contacts", the sub-query is executed because of the
condition in the subquery. Obviously, this is much slowed compared
to a JOIN which is executed once and joins the record streams
depending on the matched rows etc etc...

So, in this particular case, a better query returns the same result.

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com