O'Reilly logo

Oracle Database 11gR2 Performance Tuning Cookbook by Ciro Fiorillo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using bind variables

We have discussed bind variables in the A working example recipe in Chapter 1,

In this recipe, it is time to dig deeper into this topic, illustrating the benefits of using bind variables and testing the result of our efforts with simple examples. We will see examples on query statements, but the same methodologies and results apply to DML statements.

Getting ready

Follow these steps to prepare the database:

  1. Create a package named Chapter4 to test various aspects related to bind variables.
  2. Connect to SQL*Plus using the SH schema:
    CONNECT sh@TESTDB/sh
    
  3. Create the required package:
    CREATE OR REPLACE PACKAGE sh.CHAPTER4 AS PROCEDURE WORKLOAD_NOBIND; PROCEDURE WORKLOAD_BIND; PROCEDURE WORKLOAD_BIND_STATIC; PROCEDURE TEST_INJECTION(NAME ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required