Higher Consistent Gets for LIKE Query containing "_" than when EQUAL used (Doc ID 1438376.1)

Last updated on DECEMBER 24, 2014

Applies to:

Oracle Database - Standard Edition - Version 7.0.16.0 to 11.2.0.3 [Release 7.0 to 11.2]
Oracle Database - Enterprise Edition - Version 7.0.16.0 to 11.2.0.3 [Release 7.0 to 11.2]
Oracle Database - Personal Edition - Version 7.1.4.0 to 11.2.0.3 [Release 7.1.4 to 11.2]
Information in this document applies to any platform.

Symptoms


A query that contains a character "_" in its condition clause may get higher consistent gets for  the LIKE operation  as opposed to when the "=" operator is used, even though the wildcard "%" is not included in the query.

--Query with LIKE
select * from test_like where a like '11_000028950';

--Query with =
select * from test_like where a = '11_000028950';


 
The plan for the query looks similar however when comparing the consistent gets we see higher consistent gets with LIKE.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms