Index SCAN Instead of FAST FULL SCAN With COL LIKE '%bind Variable%'
(Doc ID 2781949.1)
Last updated on NOVEMBER 10, 2024
Applies to:
Oracle Database Cloud Exadata Service - Version N/A and laterOracle Cloud Infrastructure - Exadata Cloud Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Gen 2 Exadata Cloud at Customer - Version N/A and later
Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Information in this document applies to any platform.
Symptoms
- The query goes for index range scan instead of index fast full scan when the like predicate has leading wildcard for bind variable:
SELECT...
WHERE TEST_1 LIKE '%'||UPPER(:..)||'%'
Rows (1st) Rows (avg) Rows (max) Row Source Operation
---------- ---------- ---------- ---------------------------------------------------
1 1 ACCESS BY INDEX ROWID BATCHED TB (cr=9795 pr=9794 pw=0 time=7773144 us starts=1 cost=20693 size=44889246 card=114222)
1 1 RANGE SCAN IX_C_02 (cr=9794 pr=9793 pw=0 time=19063598 us starts=1 cost=91 size=0 card=20628)(object id 309730)
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |