Index synopsis 

Indexes can be created using the CREATE INDEX statement. Since an index is a physical database object, one can specify the TABLESPACE and storage_parameter options. An index can be created on columns or expressions. Index entries can be sorted in ASC or DESC order. Also, one can specify the sort order for NULL values. If an index is created for text fields, one can also specify the collation. The following is the synopsis for the index:

CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] name ] ON table_name [ USING method ]
( { column_name | ( expression ) } [ COLLATE collation ] [ opclass ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ] [, ...] )
[ WITH ( storage_parameter = value [, ... ] ) ]
[ TABLESPACE tablespace_name ]
[ WHERE predicate ]
Indexes are created automatically for primary keys and unique keys.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset