page175
261
Check that search optimization is enabled for the expected attributes, as shown in
Figure 7-8.
Figure 7-8.
Dynamic table search optimization enabled
However, when we attempt to estimate search optimization costs we will see
an error:
SELECT system$estimate_search_optimization_costs ( 'tpc.tpc_owner.dt_
lineitem_baseline_sos' );
Invalid value ['tpc.tpc_owner.dt_lineitem_baseline_sos'] for function
'SYSTEM$ESTIMATE_SEARCH_OPTIMIZATION_COSTS',
parameter
1: argument is not a supported table for search optimization.
While search optimization appears to be set for dynamic tables, you cannot see
the costs.
Let’s examine the dynamic table
dt_lineitem_baseline_sos
.
SET tpc_warehouse_M = 'tpc_wh_medium';
USE WAREHOUSE IDENTIFIER ( $tpc_warehouse_M );
SELECT l_comment
FROM tpc.tpc_owner.dt_lineitem_baseline_sos
WHERE l_partkey = '31587234';
The query ran in 8.5 seconds.
Chapter 7
SearCh OptimizatiOn ServiCe