Discussions
Question about oracle query transformations
----- 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.