RAW tables
RAW tables are nonlogging permanent tables that are similar to tables in a nonlogging database.
CREATE RAW TABLE IF NOT EXISTS
r_tab1 (col1 INT, col2 CHAR(40) NOT NULL);
Update, insert, and delete operations on rows in a RAW table are supported but are not logged. You can define indexes on RAW tables, but you cannot define unique constraints, primary-key constraints, or referential constraints on RAW tables.
A RAW table has the same attributes, whether it is stored in a logging database or in a nonlogging database. If you update a RAW table, you cannot reliably restore the data unless you perform a level-0 backup after the update. If the table has not been updated since that backup, you can restore the RAW table from the last physical backup, but backing up only the logical logs is not sufficient for a RAW table to be recoverable. Fast recovery can roll back incomplete transactions on STANDARD tables but not on RAW tables. For information about creating and altering RAW tables, see the Informix® Guide to SQL: Syntax.
RAW tables are intended for the initial loading and validation of data. To load RAW tables, you can use any loading utility, including dbexport and the LOAD statement of DB-Access. If an error or failure occurs while loading a RAW table, the resulting data is whatever was on the disk at the time of the failure.
- On a primary server, RAW tables can be created, dropped, and accessed. Altering the table mode, however, from unlogged to logged, or from logged to unlogged, is not allowed. Altering the logging mode of a table in a high-availability cluster environment yields error -19845.
- On secondary servers (HDR, SDS, or RSS), RAW tables are not accessible for any operation. Attempting to access a RAW table from SQL yields error -19846.