set serveroutput on;

-- The script show difference in terms of performance between SELECT statements 
-- with bind variables and without them.
-- The sequence of actions is the following:
-- 1. 10000 select operations is perfomed agains the EMP table without using bind variables
-- 2. 10000 select operations is perfomed agains the EMP table using bind variables
-- 3. Steps 2-3 are repeated but this time procedure using bind variables is called first.



PROMPT Executing 10000 SELECT statements against the EMP table without using bind variables...
exec no_bv_selects

PROMPT Executing 10000 SELECT statements against the EMP table using bind variables...
exec bv_selects


PROMPT 
PROMPT ----------------------------------------------------------------------------

PROMPT 
PROMPT Now the order in which we are using and not using bind variables will be reversed.
PROMPT 

PROMPT Executing 10000 SELECT statements against the EMP table using bind variables...
exec bv_selects

PROMPT Executing 10000 SELECT statements against the EMP table without using bind variables...
exec no_bv_selects
