SQL Performance (MOSC)

MOSC Banner

Bind Variables vs Literals

edited Dec 18, 2019 4:02AM in SQL Performance (MOSC) 14 commentsAnswered

Hello Oracle Community,

we are using Oracle 12.2 and I got a problem with bind variables. I flushed the Shared Pool (so the plan is not shared and not adaptive, changed the sql hash value with different alias names as well). At the first execution of the query the optimzier should peek into the bind variable, to get the value. The value is a date, lets say 01/01/2019. The Problem is, the query with bind variables is very slow. When I fire the same query with a "hard" date value (without bind), the query is fast. Is that a known issue ?

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.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center