Consultor Eletrônico



Kbase P2875: SQL statement containing a WHERE clause with multiple JOINS causes the SQL-92 engine to do a table s
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   07/03/2006
Status: Verified

FACT(s) (Environment):

Progress 9.1C
Progress 9.1D

SYMPTOM(s):

SQL statement causes the SQL-92 engine to perform a table scan

SQL statement containing a WHERE clause with multiple JOINS

Appropriate index exists for the table.

CAUSE:

Bug# 20020501-001

CAUSE:

The reason SQL is doing a table scan, and not using the index referred to, is that SQL thinks the table scan and related dynamic index are less costly than using the index. SQL thinks this because the code that estimates costs is seriously underestimating the cost of dynamic indexes.

The fix, to be included in Progress, is a rewrite of the cost estimation code (the cost model) for dynamic indexes. The new cost model more accurately computes the dynamic index cost, for this and similar cases, as more expensive than using the database index.

FIX:

Upgrade to 9.1D01 or latest