page68
50
USE WAREHOUSE IDENTIFIER ( $tpc_warehouse_xl );
CREATE OR REPLACE TABLE customer_baseline
AS SELECT * FROM snowflake_sample_data.tpch_sf1000.customer;
CREATE OR REPLACE TABLE lineitem_baseline
AS SELECT * FROM snowflake_sample_data.tpch_sf1000.lineitem;
CREATE OR REPLACE TABLE partsupp_baseline
AS SELECT * FROM snowflake_sample_data.tpch_sf1000.partsupp;
CREATE OR REPLACE TABLE orders_baseline
AS SELECT * FROM snowflake_sample_data.tpch_sf1000.orders;
CREATE OR REPLACE TABLE part_baseline
AS SELECT * FROM snowflake_sample_data.tpch_sf1000.part;
USE WAREHOUSE IDENTIFIER ( $tpc_warehouse_xs );
CREATE OR REPLACE TABLE nation_baseline
AS SELECT * FROM snowflake_sample_data.tpch_sf1000.nation;
CREATE OR REPLACE TABLE region_baseline
AS SELECT * FROM snowflake_sample_data.tpch_sf1000.region;
CREATE OR REPLACE TABLE supplier_baseline
AS SELECT * FROM snowflake_sample_data.tpch_sf1000.supplier;
Having briefly demonstrated how warehouse sizing affects performance while
creating a test dataset, I will move on to show query profiles.
Query Profiles
In this section, I discuss how to access query profiles using the options available in
SnowSight. I then show how to develop a simple query using the TPC baseline data to
provide a more detailed explanation of how the query profiler behaves.
I stressed the importance of sizing the warehouse appropriately, but you may find in
practice the declared warehouse is not used. This may happen for several reasons.
•
The requested results are satisfied from the query cache.
•
The query may be satisfied from the metadata repository.
You can now begin investigating query profile characteristics.
ChapTer 3
The Query profiler