Lookup Table

Like the volatile table, the lookup table can perform fast query processing by residing all the data in the memory. In addition, data input and change are reflected on disk to ensure data permanence. Compared with the volatile table, the query processing performance is the same, but the data input and change performance is somewhat lower. The characteristics of this table are as follows.

​Concept

Like the volatile table, the lookup table can perform fast query processing by residing all the data in the memory. In addition, data input and change are reflected on disk to ensure data permanence. Compared with the volatile table, the query processing performance is the same, but the data input and change performance is somewhat lower. The characteristics of this table are as follows.

​Schema Preservation

The structure (schema) information of the lookup table is retained even after the server is restarted. To drop the table, you must explicitly execute the DROP table.

​Data Preservation

Unlike the volatile table, the lookup table is restored to its original state when the server is restarted.

​Providing Indexes

Like the volatile table, it provides a RED-BLACK index. Therefore, it can be efficiently used in a search process or a join process with a log table.

Example:

mach> CREATE VOLATILE TABLE vtable (id INTEGER, name VARCHAR(10));
Created successfully.

​mach> CREATE INDEX idx_vrb ON vtable (name) INDEX_TYPE REDBLACK;
Created successfuly.

​mach> DESC vtable;

----------------------------------------------------------------
NAME TYPE LENGTH
----------------------------------------------------------------
ID integer 11
NAME varchar 10
[ INDEX ]
----------------------------------------------------------------
NAME TYPE COLUMN
----------------------------------------------------------------
IDX_VRB REDBLACK NAME
mach>

Create/Delete Lookup table

Example:

#Creating a Lookup Table
CREATE LOOKUP TABLE lktable (id INTEGER primary key, name VARCHAR (20));

#Deleting a Lookup Table
DROP TABLE lktable;

results matching ""

    No results matching ""