Consultor Eletrônico



Kbase P106577: SQL Generated by Oracle Data Server contains "1=1" with "begins" Clause
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   18/10/2005
Status: Unverified

FACT(s) (Environment):

Oracle DataServer
OpenEdge 10.0x
Oracle 9i

SYMPTOM(s):

SQL Generated by Oracle Data Server contains "1=1"

There is "begins" condition in where clause from 4GL code

The "begins" condition contains null value, ie, begins ""

The "1=1" in generated SQL matches the where clause with begins "" condition

Oracle is doing full table scan with the SQL statements

Oracle's full table scan causes slow response

CAUSE:

Bug # 20050725-003

FIX:

1. Upgrade to 10.0B03. Bug is fixed in 10.0B03
The fix is to use "LIKE" clause for queries with "BEGINS """.
or
2. Use qt_no_bind_where connection parameter or
query-tuning (no_bind_where) to change the behavior