Quick Search:
 
 The Oracle PL/SQL PCTFREE Keyword      [Return To Index] Jump to:  

Term: PCTFREE

Definition:
In Oracle PL/SQL, PCTFREE is a block utilization parameter which is used to specify the free space in a data block. By default, its value is 10. The statement "PCTFREE is set as 10" means that 10% space would be kept free in all data blocks in the table for its future growth. Once the data block is left with only PCTFREE free space, it is removed from the free list. Subsequently, Oracle will hold the INSERT operation on the table until the next block is added to the free list.

Note that sum of PCTFREE and PCTUSED cannot exceed 100 at any time.

Example Syntax:

For a table, PCTFREE parameter can be set at table definition level

CREATE TABLE [schema.] table
(column datatype [ , column datatype ] ...)
[TABLESPACE tablespace ]
[ PCTFREE integer ]
[ PCTUSED integer ]
[ INITRANS integer ]
[ MAXTRANS integer ]
[ STORAGE storage-clause ]
[LOGGING | NOLOGGING]
[CACHE | NOCACHE] ]


Example Usage:

In this example, the table "ORDERS" is created with PCTFREE 20.

CREATE TABLE ORDERS
(
ORDER_ID NUMBER,
ITEM_CODE VARCHAR2(100),
EXEC_NAME VARCHAR2(100))
PCTFREE 20
PCTUSED 50



Related Links:
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org