page166
252
Estimating Table Search Optimization Costs
As previously discussed, you should selectively enable SOS on a table-by-table basis
according to usage and perceived benefits. I will discuss how to enable SOS on an
attribute by attribute basis later in this chapter; within this section I am establishing
broad principles.
You should note SOS estimates are just that: an SOS estimate does not guarantee
real-world delivery of suggested benefit. The Snowflake documentation suggests
actual realized costs can vary by 50 percent or more. You can find more information
at
https://docs.snowflake.com/en/sql-reference/functions/system_estimate_
search_optimization_costs
.
Invoking cost estimation for a table can be done like this:
SELECT system$estimate_search_optimization_costs
( 'tpc.tpc_owner.lineitem_baseline' );
The returned JSON record when formatted using
https://jsonformatter.org/
and
annotated with comments looks like Figure 7-2.
Chapter 7
SearCh OptimizatiOn ServiCe