Using Multiple Locations
Vector can store data in multiple physical locations on disk. This feature lets you add more locations to a database if disk space is low.
You can store different classes of data (tables) on separate physical drives. Different columns of a single table can be stored in different locations. You can also assign a temporary storage location for spilling to disk. Multiple locations also enable manual performance tuning by strategically storing tables in different locations.
A table can be stored in more than one location by specifying a location for each column (vertical partitioning). Only one location can be specified per column.
Horizontal Partitioning
A table or single column can be stored in multiple storage locations, a feature known as horizontal partitioning (in contrast to vertical partitioning in which different columns are stored in different locations).
Horizontal partitioning is useful if disk space in a single location is insufficient to contain the table, or if the database administrator wants to stripe table access across multiple physical drives, controllers, or arrays to optimize performance.
You can horizontally partition a table or column by using appropriate syntax on the following statements:
• CREATE TABLE...WITH LOCATION
• CREATE INDEX...WITH LOCATION
• ALTER TABLE...ADD COLUMN...SET LOCATION
• DECLARE GLOBAL TEMPORARY TABLE...WITH LOCATION
A table or column is horizontally partitioned across all listed locations. You cannot specify which records are stored in which partition; the system distributes the records in a round-robin fashion among the specified partitions and in the specified order. The order of locations and the granularity of partitioning may change after automatic update propagation or after issuing a MODIFY...TO COMBINE statement.
The output of the HELP TABLE statement shows the table Location as the set of locations used by the most columns when the table is created. The Column Location lists locations for columns that do not have the same locations as the table locations.
Restrictions:
• All the locations in which a table or column will be stored must be specified when the table (CREATE TABLE) or column (ALTER TABLE) is created. The locations for a column cannot change.
• If a specified location is full, appending data to the table will fail. "Switching off" the location is not possible.