Reports web Page

 

About Oracle


  Home

  About ME

  Summaries

  Key Definitions

  Links

  My Report

 

Use Bind Variables

This is very important !!!
After reading this section I have just understood that what a big mistake i was doing. If you do not know WHAT IS BIND VARIABLES take attention!

Bind variables is used instead of your literals. You are using :x or smthg else instead of literals
For example:

Select student from CSE where number = 1923

If you are using above query for once ok. This will be parsed,qualified,security checked,optimized.Then query plan is stored into the shared pool.But if you use this query more than once there is better solution,

Select student from CSE where number = 1453
Select student from CSE where number = 1907
Select student from CSE where number = 1040

Then each time these queries will be parsed,qualified,security checked,optimized.Each query will be
behaved as new query Although they are same.If we use Bind Variable instead of this st:

Select student from CSE where number = :number

Than one query plan will be formed and stored in the shared pool.It is 3 times effective in a 10000 insertion. And this parsing with bind variables is soft Parse. Other one is hard parse. Since Latches is responsible for low-level serialization these Latches data structures in the shared pool when using literals this pool is expanded and not only performance also speed of the system decrease.