Subject | Re: [firebird-support] Table Scans and != |
---|---|
Author | Daniel Rail |
Post date | 2003-08-05T01:07:34Z |
Hi,
At August 4, 2003, 21:41, Robert DiFalco wrote:
doesn't have a specific value as a reference to retrieve the other
records, from the database. And, it probably uses the same logic no
matter what the type of field the column is defined as(varchar,
numeric, etc...). Maybe, the optimizer can be optimized for numeric
fields in this scenario, but don't expect that to happen in FB 1.5,
but there are plans to further improve the optimizer in FB 2.
For numeric values, you can also use
"(column < value) or (column > value)", and that should use the index.
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)
At August 4, 2003, 21:41, Robert DiFalco wrote:
> Indeed. What I found interesting (and I guess it makes sense once IAlso, "NOT (column = value)", doesn't use an index, because the engine
> think it through) is that:
> column != value (or column <> value)
doesn't have a specific value as a reference to retrieve the other
records, from the database. And, it probably uses the same logic no
matter what the type of field the column is defined as(varchar,
numeric, etc...). Maybe, the optimizer can be optimized for numeric
fields in this scenario, but don't expect that to happen in FB 1.5,
but there are plans to further improve the optimizer in FB 2.
For numeric values, you can also use
"(column < value) or (column > value)", and that should use the index.
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)