Database Tuning (MOSC)

MOSC Banner

Discussions

Question about oracle query transformations

in Database Tuning (MOSC) 8 commentsAnswered ✓

----- Current SQL Statement for this session (sql_id=4c85twjpdg8g9) -----


select /*+ 123456 */ count(*) from gl_detail where prepareddatev='2022-01-22 15:00:00'




*******************************************


Peeked values of the binds in SQL statement


*******************************************




Final query after transformations:******* UNPARSED QUERY IS *******


SELECT COUNT(*) "COUNT(*)" FROM "NC63"."GL_DETAIL" "GL_DETAIL" WHERE "GL_DETAIL"."PREPAREDDATEV"='2022-01-22 15:00:00' AND SUBSTR("GL_DETAIL"."PREPAREDDATEV",1,10)='2022-01-22'


kkoqbc: optimizing query block SEL$1 (#0)




Why after transformations ,oracle add condition SUBSTR("GL_DETAIL"."PREPAREDDATEV",1,10)='2022-01-22'


PS : I have test another table ,there isn't exist this problem.It happens only for this table.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

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

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center