January 2012
Intermediate to advanced
542 pages
11h 28m
English
In this recipe we will see the overhead introduced by indexes and triggers on DML operations. We will explore alternative ways to implement calculated fields using virtual columns instead of triggers.
The following steps will demonstrate the index and trigger overheads:
SH schema:
CONNECT sh@TESTDB/sh
MY_CUSTOMERS, copying the CUSTOMERS table structure:CREATE TABLE MY_CUSTOMERS AS SELECT * FROM CUSTOMERS WHERE ROWNUM < 1;
CUSTOMERS to MY_CUSTOMERS, measuring time:SET TIMING ON INSERT INTO MY_CUSTOMERS SELECT * FROM CUSTOMERS; SET TIMING OFF
MY_CUSTOMERS table:
TRUNCATE TABLE MY_CUSTOMERS;