Some summaries of the Informix database temporary tables

Source: Internet
Author: User
Tags informix
In the Informix database, a temporary table is created to handle temporary data in the application, and temporary table data is stored in the temporary tablespace, and the Informix system does not record the temporary table's dictionary information from the Database system table to query for any relevant information about the temporary table, you can create the index on the temporary table.     The scope of the temporary table is session, and the temporary table is automatically deleted by the database when the sessions end (the application disconnects the database), the database instance closes, and the system shuts down abnormally. temporary table SQL syntax Creation (1) the SELECT INTO Temp statement implicitly creates a temporary table; select * from TABLE1 into temp TMP1; or SELECT * from TABLE1 to TEMP TMP1 with NO LOG; (2) Create temp table statement explicitly creates temporary tables; note naming rules: 1. Temporary tables only function in a session; 2. In the same session, the temporary table must be different from the other tables, view, sequence, s in the current database. The name of the ynonym; 3. Can be the same as the name of a temporary table in another session; 4. In the same session, you cannot create a temporary table with the same name, you can delete it before you create it, with no log; in the log database, the temporary table does not record the transaction log; EMP TABLE (...)
); or CREATE TEMP TABLE (...) With NO LOG; Optimization of temporary tables cancel log 1. In the log database, with no log, the option cancels the temporary DML operation log, which greatly improves the data processing efficiency; 2.         Use temporary tablespace to improve the performance of temporary tables by using temporary table space: Create separate temporary tablespace to prevent I/O contention with root dbspace and default tablespace; Create multiple temporary tablespaces and properly configure Dbspacet EMP parameters, allocating sufficient storage space for temporary table spaces to prevent the presence of temporary table spaces; Large data temporary tables are distributed in Round-robin mode across multiple temporary tablespace spaces. and setting PDQ priority>0 can improve the efficiency of concurrency processing of temporary table data; Use the With no Log option based on the temporary table storage table space usage principle; temporary tablespace cannot use direct I/O, so you Need to allocate enough AIO VPs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.