January 2012
Intermediate to advanced
542 pages
11h 28m
English
In the previous recipe, we saw that using indexes leads to performance improvements; however, we need to take care that DML operations are slower due to the operations involved to keep the index synchronized with table data.
Rebuilding an index is an operation that can provide performance benefits because it reduces intra-block fragmentation.
The following steps have to be carried out initially:
CONNECT sh@TESTDB/sh
CREATE TABLE BIG_CUSTOMERS AS SELECT * FROM CUSTOMERS;
BEGIN FOR j IN 1..100 LOOP INSERT INTO BIG_CUSTOMERS SELECT * FROM CUSTOMERS; END LOOP; COMMIT; END;