nerdexam
Oracle

1Z0-052 · Question #12

Which three statements are correct about temporary tables? (Choose three.)

The correct answer is A. Indexes and views can be created on temporary tables C. Temporary tables are always created in a user's temporary tablespace E. Data Manipulation Language (DML) locks are never acquired on the data of temporary tables. Global temporary tables support indexes and views, store data in the session's temporary tablespace, and never acquire DML locks since data is session-private.

Managing Schema Objects

Question

Which three statements are correct about temporary tables? (Choose three.)

Options

  • AIndexes and views can be created on temporary tables
  • BBoth the data and structure of temporary tables can be exported
  • CTemporary tables are always created in a user's temporary tablespace
  • DThe data inserted into a temporary table in a session is available to other sessions
  • EData Manipulation Language (DML) locks are never acquired on the data of temporary tables

How the community answered

(28 responses)
  • A
    93% (26)
  • B
    4% (1)
  • D
    4% (1)

Why each option

Global temporary tables support indexes and views, store data in the session's temporary tablespace, and never acquire DML locks since data is session-private.

AIndexes and views can be created on temporary tablesCorrect

Oracle allows indexes and views to be defined on global temporary tables - index data is also session-specific and stored in the temporary tablespace alongside the table data.

BBoth the data and structure of temporary tables can be exported

Only the DDL structure of a global temporary table can be exported using Data Pump or exp - the transient session data cannot be exported since it does not persist after the session or transaction ends.

CTemporary tables are always created in a user's temporary tablespaceCorrect

The data rows inserted into a global temporary table are stored in temp segments allocated from the session's assigned temporary tablespace.

DThe data inserted into a temporary table in a session is available to other sessions

Data inserted into a global temporary table is visible only within the inserting session - other sessions see the table as empty because each session has its own private data segment.

EData Manipulation Language (DML) locks are never acquired on the data of temporary tablesCorrect

Because each session's temporary table data is completely private and invisible to other sessions, Oracle does not need to acquire DML locks on the data, avoiding lock contention entirely.

Concept tested: Oracle global temporary table characteristics and restrictions

Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/cncpt/tables-and-table-clusters.html

Topics

#temporary tables#temporary tablespace#DML locks#session data

Community Discussion

No community discussion yet for this question.

Full 1Z0-052 Practice