Subject | Re: [firebird-support] using indices |
---|---|
Author | Anderson Farias |
Post date | 2008-09-19T11:20:07Z |
Hi,
indexes. This is not always true if you're using FB2+ since it has features
like computed indexes. IF that's not the case here than...
...OTOH, using as much indices as it's available is not the best option, so,
is one of the indices has a lot better eficience (selectivity + restricted
condition) than I think FB optimizer will use only use only this one. In
this case I assume 'ID_PROVEDOR=x' is much better than 'SALDO>0'
Regards,
Anderson Farias
> select sum(saldo) from fac_com where (ABS(SALDO)>0) and (id_proveedor =Well, first of all, usually when you do field operations FB can't use
> :id_proveedor)
> ...
> Why FB does not uses both indices?
indexes. This is not always true if you're using FB2+ since it has features
like computed indexes. IF that's not the case here than...
...OTOH, using as much indices as it's available is not the best option, so,
is one of the indices has a lot better eficience (selectivity + restricted
condition) than I think FB optimizer will use only use only this one. In
this case I assume 'ID_PROVEDOR=x' is much better than 'SALDO>0'
Regards,
Anderson Farias