Subject Re: [firebird-support] Slow query because an index is not picked up during sort
Author Ann Harrison
On Mon, Jun 4, 2012 at 3:11 AM, Svein Erling Tysvær <
svein.erling.tysvaer@...> wrote:

>
> Firebird doesn't have histograms yet, and logically speaking (I do not
> know the internals of the optimizer, nor the selectivity of your indexes,
> so this is how I would think if I should do things manually):
>


Just as an aside, histograms will be less of a gain for Firebird than for
some databases because we optimize queries when they're prepared rather
than when they're run. That means that for many queries, the optimizer
won't know what value the query will produce for any particular index look
up. That's particularly true for the inner look up on nested loop joins.

Cheers,

Ann


[Non-text portions of this message have been removed]