Reader small image

You're reading from  Oracle Database 11gR2 Performance Tuning Cookbook

Product typeBook
Published inJan 2012
Reading LevelIntermediate
PublisherPackt
ISBN-139781849682602
Edition1st Edition
Languages
Right arrow
Author (1)
Ciro Fiorillo
Ciro Fiorillo
author image
Ciro Fiorillo

Ciro Fiorillo is an IT professional and consultant with experience of more than a decade in different roles (developer, analyst, DBA, project manager, data and software architect) among software industries. He has worked on different technologies and architectures, such as Oracle, SQL Server, Delphi, C# and .NET Framework, C/C++, Java, PHP, COBOL, Fortran, and Tibco. Ciro is currently employed as Lead Software and Data Architect with FinWin Srl, a software house specializing in banking and loans applications. As a freelancer he writes articles for websites and printed magazines about software and computing, participates in workshops, and teaches C++ and Fortran parallel programming with Intel Software tools. Ciro can be reached at ciro@cirofiorillo.com.
Read more about Ciro Fiorillo

Right arrow

Using LOBs


LOBs (Large OBjects) are a particular data type, used to store large binary or character objects inside the database or outside the database when using BFILEs. In this recipe, we will see how to use LOB fields to avoid performance degradation and space wasting.

Getting ready

The following steps have to be performed initially;

  1. Connect to the database as SYSDBA:

    CONNECT /@TESTDB AS SYSDBA
    
  2. Grant the following permission to user SH:

    GRANT CREATE ANY DIRECTORY TO SH;
    
  3. Create a tablespace for LOBs:

    CREATE TABLESPACE ASSM_TS DATAFILE 'ASSM_TS.DBF' SIZE 100M
    EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
    

How to do it...

In this recipe, we will see how to use LOB felds to avoid performance degradation and space wasting. Follow these steps:

  1. Connect to the database as user SH:

    CONNECT s.5h@TESTDB/sh
    
  2. Create a table to do some tests copying the CUSTOMERS table and its contents:

    CREATE TABLE MyCustomers AS SELECT * FROM Customers;
    
  3. Add a BLOB field to the table:

    ALTER TABLE MyCustomers ADD...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Oracle Database 11gR2 Performance Tuning Cookbook
Published in: Jan 2012Publisher: PacktISBN-13: 9781849682602

Author (1)

author image
Ciro Fiorillo

Ciro Fiorillo is an IT professional and consultant with experience of more than a decade in different roles (developer, analyst, DBA, project manager, data and software architect) among software industries. He has worked on different technologies and architectures, such as Oracle, SQL Server, Delphi, C# and .NET Framework, C/C++, Java, PHP, COBOL, Fortran, and Tibco. Ciro is currently employed as Lead Software and Data Architect with FinWin Srl, a software house specializing in banking and loans applications. As a freelancer he writes articles for websites and printed magazines about software and computing, participates in workshops, and teaches C++ and Fortran parallel programming with Intel Software tools. Ciro can be reached at ciro@cirofiorillo.com.
Read more about Ciro Fiorillo