The Oracle (tm) Users' Co-Operative FAQ

Can Bind Variable Peeking cause problems without a histogram on Predicate columns ?

Author's name: see below

Author's Email: see below

Date written: 14.7.2006

Oracle version(s):

It is a well known fact that the reason for the majority of problems with the bind variable peek feature is an histogram on the column referenced in the access predicate. The histogram is certainly the main but not the only cause for a non appropriate execution plan. Another less known situation where a different value of bind variables can lead to a change of execution plan is an access predicate on a (sub)partitioned table. This is a particularly important scenario in case of range partitioned fact tables organized as rolling windows. These tables contain two types of partitions, those filled up and those pre allocated to future loads. As the optimiser statistics of both types are very different, the risk of getting the wrong execution plan in case of peeking “in the wrong partition” is relatively high.

Back to index of questions

This question is addressed by the following documents:



Suggested by

Referee's comments

Jaromir D.B.Nemec

Happy New Peek


This is a true story with all kind of exciting attributes:
large partitioned tables with proper collected statistics on them,
nothing was changed but a nightly job performance explodes,
no histogram on the access predicate column,
Oracle 9i / 10g in a data warehouse environment





Further reading:
Oracle Documentation - Bind variable peek

Back to top

Back to index of questions