Kbase 7302: SQL SELECT from VIEW slower than straight SELECT --- BUG
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  8/4/2000 |
|
SQL SELECT from VIEW slower than straight SELECT --- BUG
900824-mlb02 In using PROGRESS SQL SELECT alone and with a VIEW the
amount of time it takes to do essentially the same SELECT
should be about the same. But a SELECT directly from the
files using all necessary criteria will perform the
selection much more quickly than SELECT ... FROM viewname.
Reason? When a VIEW is created the records are not
yet pointed to, meaning no workfile is created. The VIEW
is only a macro that is applied to the subsequent SELECT ...
FROM viewname. En otras palabras (sorry, In other words),
the actual SELECT is constructed from the SELECT ... FROM
viewname WHERE ... and the macro created by the named view.
Herein lies the problem: The tool we use to translate
the SQL statements into PROGRESS 4GL (Optimizer) has a bug.
Specifically, parentheses were being incorrectly placed in
the translation and excluding the WHERE portion of the
SELECT ... FROM viewname in the resultant code. It had the
same effect as placing parentheses around the VIEW criteria
and then adding the criteria from the SELECT statement as
an AND operation, which for some reason makes the search
incredibly slow.
I'm afraid there is no known workaround at this time.
John Sadd said the fix should be in the next round of v6
revisions.
Progress Software Technical Support Note # 7302