[Online lesson excerpt]6.1oracle temporary table

Source: Internet
Author: User

1 Conceptual understanding

The temporal table of an Oracle system is often used to hold intermediate data for system operations, and because no redo is generated for any temporary operation (but redo is generated by modifying undo), the data operations of the temporal table are generally more efficient. There are two main types of temporary tables, one is a temporary table based on the transaction, the other is a session-based temporal table, and a transaction-based temporal table is only when the transaction is committed or rolled back, the data of the temporary table is emptied; The session-based temporal table is the only time that the temporary table data is emptied when the session ends. Both types of temporary table data are visible to the current session.

2 transaction-based temporal tables

Create a transaction-based staging table:

Here we create a temporary table based on the transaction, and we have inserted the data when we created it, why is there no data when we query it? This is because a transaction-based temporal table empties the data as soon as the transaction is rolled back or committed, and the DDL statement operation implicitly commits a commit action, which triggers the purge of the data table.

Let's insert one more time:

3 Session-based temporal tables

To create a session-based temporal table TEMP2:

4 Indexes of temporary tables

5 Some limitations of temporary tables

[Online lesson excerpt]6.1oracle temporary table

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.