Lab10 Caching
Lab10 Caching
Lab10 Caching
// Run the same query again and observe time taken and query profile
SELECT * FROM TPCH_SF1000.CUSTOMER; -- 113 ms
// Try to fetch same data by changing queries little bit and observe query profile
SELECT C_CUSTKEY, C_NAME, C_ACCTBAL, C_ADDRESS FROM TPCH_SF1000.CUSTOMER; -- 53 sec
SELECT C_CUSTKEY, C_ADDRESS FROM TPCH_SF1000.CUSTOMER; -- 36 sec
SELECT C_ADDRESS, C_CUSTKEY FROM TPCH_SF1000.CUSTOMER; -- 32 sec
==================================================================
// Turn off Results Cache, Suspend the VW, run same queries and see query profile
ALTER SESSION SET USE_CACHED_RESULT = FALSE;
// Run the same query again and observe time taken and query profile
SELECT * FROM TPCH_SF1000.CUSTOMER; -- 2 min 15sec
// Try to fetch same data by changing queries little bit and observe query profile
SELECT C_CUSTKEY, C_NAME, C_ACCTBAL, C_ADDRESS FROM TPCH_SF1000.CUSTOMER; -- 53sec
SELECT C_CUSTKEY, C_ADDRESS FROM TPCH_SF1000.CUSTOMER; -- 34sec
SELECT C_ADDRESS, C_CUSTKEY FROM TPCH_SF1000.CUSTOMER; -- 34sec
// Increase VW size to L or XL, run same queries and see query profile
// Run the same query again and observe time taken and query profile
SELECT * FROM TPCH_SF1000.CUSTOMER; -- 14 sec
// Try to fetch same data by changing queries little bit and observe query profile
SELECT C_CUSTKEY, C_NAME, C_ACCTBAL, C_ADDRESS FROM TPCH_SF1000.CUSTOMER; -- 4.8sec
SELECT C_CUSTKEY, C_ADDRESS FROM TPCH_SF1000.CUSTOMER; -- 7.9 sec
SELECT C_ADDRESS, C_CUSTKEY FROM TPCH_SF1000.CUSTOMER; -- 3.4 sec
// Try to fetch subset of data, with a filter
SELECT C_CUSTKEY, C_NAME, C_ACCTBAL, C_ADDRESS FROM TPCH_SF1000.CUSTOMER
WHERE C_CUSTKEY < 200000; -- 891