DUMMY system table

Column name Column type Column constraint Table constraints
dummy_col INTEGER NOT NULL  

The DUMMY table is provided as a read-only table that always has exactly one row. This can be useful for extracting information from the database, as in the following example that gets the current user ID and the current date from the database.

SELECT USER, today(*) FROM IQ.DUMMY;

Use of IQ.DUMMY in the FROM clause is optional. If no table is specified in the FROM clause, the table is assumed to be IQ.DUMMY. The above example could be written as follows:

SELECT USER, today(*);
dummy_col – This column is not used. It is present because a table cannot be created with no columns.

The cost of reading from the IQ.DUMMY table is less than the cost of reading from a similar user-created table because there is no latch placed on the table page of IQ.DUMMY.

Access plans are not constructed with scans of the IQ.DUMMY table. Instead, references to IQ.DUMMY are replaced with a Row Constructor algorithm, which virtualizes the table reference. This eliminates contention associated with the use of IQ.DUMMY. DUMMY still appears as the table and/or correlation name in short, long, and graphical plans.