Presentation is loading. Please wait.

Presentation is loading. Please wait.

KCIUG 30 January, 2004Raw Tables for Improved Load Performance1 Christopher Coleman Database Analyst Mediware Information Systems.

Similar presentations


Presentation on theme: "KCIUG 30 January, 2004Raw Tables for Improved Load Performance1 Christopher Coleman Database Analyst Mediware Information Systems."— Presentation transcript:

1 KCIUG 30 January, 2004Raw Tables for Improved Load Performance1 Christopher Coleman Database Analyst Mediware Information Systems

2 KCIUG 30 January, 2004Raw Tables for Improved Load Performance2 Christopher Coleman President Kansas City Informix Users Group http://www.iiug.org/kciug/ Database Analyst Mediware Information Systems, Inc http://www.mediware.com/ Technical Support Engineer Informix Software, Inc. –1998 – 2001 Christopher.Coleman@Mediware.com

3 KCIUG 30 January, 2004Raw Tables for Improved Load Performance3 Two Types of Permanent Tables STANDARD TABLE –Logging table Not logged in nonlogging database –Default RAW TABLE –Nonlogging table

4 KCIUG 30 January, 2004Raw Tables for Improved Load Performance4 Standard vs. Raw CharacteristicStandardRAW PermanentYes LoadableYes LoggedYesNo IndexesYesNo RollbackYesNo Enterprise ReplicationYesNo RecoverableYesDepends RestorableYesDepends

5 KCIUG 30 January, 2004Raw Tables for Improved Load Performance5 Limitations of Raw Tables Raw tables do not support indexes, referential constraints, or rollback. A physical backup can be used to restore a raw table if it has not been updated since that backup. Fast recovery does not roll back incomplete transactions on raw tables. Enterprise Replication is not allowed on raw tables.

6 KCIUG 30 January, 2004Raw Tables for Improved Load Performance6 Loading with Raw Tables Raw tables are designed for improved loads. –From the IBM Informix Dynamic Server Administrator’s Guide: http://publibfi.boulder.ibm.com/epubs/pdf/ct1ucna.pdf “ RAW tables are intended for the initial loading and validation of data. To load RAW tables, you can use any loading utility, including dbexport or the High- Performance Loader (HPL) in express mode. 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. ” Raw tables use light appends. –Rows added quickly to the end of each table fragment.

7 KCIUG 30 January, 2004Raw Tables for Improved Load Performance7 Comparing Load Performance Create three tables with identical columns. –One standard. –One raw. –One standard converted to raw before load and converted back to standard after. Load 10,000,000 rows. –Approximately 250 MB Compare times.

8 KCIUG 30 January, 2004Raw Tables for Improved Load Performance8 SQL for Raw Tables Creating raw tables –Syntax like standard with addition of keyword: RAW CREATE RAW TABLE raw_table (…); Altering Raw Tables to Standard ALTER TABLE raw_table TYPE (STANDARD); Altering Standard Tables to Raw ALTER TABLE raw_table TYPE (RAW); Other SQL same as used for Standard tables

9 KCIUG 30 January, 2004Raw Tables for Improved Load Performance9 Table Definitions Standard Table –last_name_dist Raw table –last_name_dist_raw Standard table converted to raw for load and converted back after load. –last_name_dist_cnv Columns –last_nameLVARCHAR –frequencyDECIMAL(5,2) –cum_freqDECIMAL(5,2) –rankINTEGER

10 KCIUG 30 January, 2004Raw Tables for Improved Load Performance10 Load Performance Comparison TableTotal Time in Minutes Standard30:36 Raw19:16 Conversions29:05

11 KCIUG 30 January, 2004Raw Tables for Improved Load Performance11 Redundant Warning From the IBM Informix Dynamic Server Administrator’s Guide : It is recommended that you do not use RAW tables within a transaction. Once you have loaded the data, use the ALTER TABLE statement to change the table to type STANDARD and perform a level-0 backup before you use the table in a transaction. Ignoring this can result in data inconsistency.

12 KCIUG 30 January, 2004Raw Tables for Improved Load Performance12 IDS Versions IDS 7.31 –Documented only in release notes. IDS 8 –Fully Documented IDS 9.21 and following –Documented in release notes. –Fully Documented for 9.4

13 KCIUG 30 January, 2004Raw Tables for Improved Load Performance13 In Closing RAW tables are nonlogging tables intended for rapid loading and validation of data. RAW tables do not support indexes, referential constraints, or rollbacks. Backup and recovery is only possible with physical backups. Fast recovery is only possible if checkpoint followed load.


Download ppt "KCIUG 30 January, 2004Raw Tables for Improved Load Performance1 Christopher Coleman Database Analyst Mediware Information Systems."

Similar presentations


Ads by Google