Checking whether query routing is enabled by using EXPLAIN diagnostics
Use the EXPLAIN utility to generate extended diagnostic information if a statement is no longer cached in memory or you need more detailed query-routing information.
About this task
Procedure
To use the EXPLAIN utility to check whether query routing is enabled:
Example
The following examples show diagnostic information that the EXPLAIN utility might generate:
- The following output shows that the isolation level of the materialized query table prevented
the table from being used in the query. Queries that run under isolation level RS or RR are not
routed to shadow tables.
Extended Diagnostic Information: -------------------------------- Diagnostic Identifier: 1 Diagnostic Details: EXP0053W The materialized query table "DBGUEST1". "ROWT_SHADOW" was not considered for query matching because the isolation level of the query is higher than the isolation level of the materialized query table.
- The following output shows the message that is returned when a query references row-organized tables with
associated shadow tables and row-organized tables without
associated shadow tables. All row-organized tables that are referenced in a query must have
associated shadow tables for the query to be routed to shadow
tables.
Extended Diagnostic Information: -------------------------------- Diagnostic Identifier: 1 Diagnostic Details: EXP0076W No materialized query table matching was performed on the statement during query rewrite because there is a shadow table defined on at least one,but not every, row-organized table referenced in the query...
- The following output shows the message that is returned when query routing to the shadow table
does not happen because the current latency between the source table and the shadow table does not
fall within the limit that is specified by the value of the CURRENT REFRESH AGE special
register:
Extended Diagnostic Information: -------------------------------- Diagnostic Identifier: 1 Diagnostic Details: EXP0087W No materialized query table matching was performed on the statement during query rewrite because there is a shadow table defined on one of tables in the query and the current replication the latency is larger than the time value specified in the CURRENT REFRESH AGE special register.