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;
SELECT USER, today(*);
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. Note that DUMMY still appears as the table and/or correlation name in short, long, and graphical plans.