page173
259
Figure 7-6.
Standard table search optimization enabled
Estimating search optimization costs for the standard table indicates the SOS is
enabled.
SELECT system$estimate_search_optimization_costs
( 'tpc.tpc_owner.lineitem_baseline_std' );
You should see search optimization is enabled.
Let’s now query the table to invoke search optimization by using an enabled attribute
within the predicates.
SET tpc_warehouse_M = 'tpc_wh_medium';
USE WAREHOUSE IDENTIFIER ( $tpc_warehouse_M );
SELECT l_comment
FROM tpc.tpc_owner.lineitem_baseline_std
WHERE l_partkey = '31587234';
The query ran in 1.6 seconds.
Checking the query profile as shown in Figure 7-7 proves search optimization was
successfully used.
Figure 7-7.
Standard table search optimization profile
Chapter 7
SearCh OptimizatiOn ServiCe