Em 10/4/2014 19:42, Thomas Beckmann escreveu:
> Hm, this is just getting rid of using the index on sku - depending on
> it's selectivity, this might be a way, but than, the index might be of
> no use...
>
>>    SALEITEMS.SKU+0 = :vSKU AND
> You might check combined indexes...

It's avoiding to use the index in this particular query, it does not 
mean it has no use... In a diferent query it could be a good index. And 
I think this index is generated by a FK constraint, and could not be 
removed.

How he can combine the index of two distinct tables ?

To the OP:
If you change the query to use fixed values instead of parameters does 
it change anything ? I cant remember if the FB optimizer take in count 
the range of the between, I don't think so, but you could give it a try.




------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

Reply via email to