3. Statements : OpenROAD SQL Statements : Set Statement : Result_Structure
 
Share this page                  
Result_Structure
The set result_structure statement changes the default storage structure for tables created with the create table...as select statement.
This storage structure can be any of the structures described in the MODIFY statement, that is, heap, cheap, heapsort, cheapsort, hash, chash, btree, cbtree, isam, or cisam.
The default storage structure for a table created by the create table as statement is cheap. For example:
set result_structure hash;
create temp as select id ... ;
does the same as:
create temp as select id ... ;
modify temp to hash;
For btree, cbtree, hash, chash, isam, and cisam, the newly created table is automatically indexed on the first column. This results in the above table “temp” being created with a storage structure of hash, keyed on the first column “id”.