FRAGMENT BY clause

Use the FRAGMENT BY clause to create a fragmented table and to specify its storage distribution scheme. The keywords PARTITION BY are a synonym for FRAGMENT BY.

This syntax fragment is part of the Storage options.
Read syntax diagramSkip visual syntax diagram
FRAGMENT BY clause for tables

|--+-------------+--+-FRAGMENT -+--BY--------------------------->
   '-WITH ROWIDS-'  '-PARTITION '       

                        .-,-------.                                  
                        V         |                                  
>--+-ROUND ROBIN--+-IN----dbspace-+-----------------------+------+--|
   |              | .-,---------------------------------. |      |   
   |              | V                                   | |      |   
   |              '---PARTITION--partition--IN--dbspace-+-'      |   
   |                                            (1)              |   
   +-EXPRESSION--| Expression Fragment Clause |------------------+   
   |                                                         (2) |   
   +-RANGE--(--fragment_key--)--| Interval Fragment Clause |-----+   
   |                                                    (3)      |   
   '-LIST--(--fragment_key--)--| List Fragment Clause |----------'   

Notes:
  1. See Expression Fragment Clause
  2. See Interval fragment clause
  3. See List fragment clause
Element Description Restrictions Syntax
column Column to which to apply the fragmentation strategy Must be a column within the table Identifier
dbspace Dbspace to store the table fragment You can specify no more than 2,048 dbspaces. All dbspaces that store the fragments must have the same page size. Identifier
fragment _key Cast, column, or function expression on a table column. This is the expression on which the table is fragmented. Columns must be from the current table only Expression
partition Name declared here for a fragment Must be unique among the names of fragments of the table Identifier

When you fragment a table, the IN keyword is followed by the name of the storage space where a table fragment is to be stored.


Copyright© 2019 HCL Technologies Limited