Private Temporary Tables are temporary tables that exist only for the duration of a session or transaction. They are prefixed with ORA$PTT_ and are managed entirely in memory.
- PTTs are not visible to other sessions, unlike global temporary tables.
- They are lightweight and fast, making them suitable for high-performance operations.
- The document highlights their use in multitenant environments, where session isolation is critical.
The ON COMMIT PRESERVE DEFINITION option creates a private temporary table that is session-specific. Oracle removes all data and drops the table at the end of the session.
Quiz
Which three statements are true about Private Temporary Tables (PTTs) in an Oracle Database? (Choose three.)
A. Creating a PTT is DDL and commits any active transaction for the session.
B. Concurrent sessions may have PTTs with the same name and the same column definitions.
C. It is possible to preserve the private table definition but remove the rows when a session with a PTT issues a COMMIT.
D. Concurrent sessions may have PTTs with different names but same column definitions.
E. Concurrent sessions may have PTTs with the same name but different column definitions.
Resources
https://docs.oracle.com/en/database/oracle/oracle-database/18/obeab/index.html
https://www.oracletutorial.com/oracle-basics/oracle-private-temporary-table/
Answer B,D,E
Leave a Reply