0% found this document useful (0 votes)
4 views

Search Optimization Quickstart

Uploaded by

Kruthi R
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Search Optimization Quickstart

Uploaded by

Kruthi R
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

--Search Optimization Quickstart Lab :

--https://quickstarts.snowflake.com/guide/getting_started_with_search_optimization/
index.html#0

USE DATABASE TUTORIAL_DB;

USE SCHEMA PUBLIC;

CREATE TABLE SEARCHOPT_DEMO as SELECT * FROM


SNOWFLAKE_SAMPLE_DATA.TPCH_SF100.CUSTOMER;

ALTER TABLE SEARCHOPT_DEMO ADD search OPTIMIZATION;

select SYSTEM$ESTIMATE_SEARCH_OPTIMIZATION_COSTS('SEARCHOPT_DEMO');

DESCRIBE SEARCH OPTIMIZATION ON SEARCHOPT_DEMO;

----------

create table CUSTOMER as select * from


SNOWFLAKE_SAMPLE_DATA.TPCDS_SF100TCL.CUSTOMER;

create table customer_SOS clone CUSTOMER;

ALTER TABLE customer_SOS ADD search OPTIMIZATION;

SELECT *
FROM CUSTOMER
WHERE C_CUSTOMER_SK = '4722123';

SELECT *
FROM customer_SOS
WHERE C_CUSTOMER_SK = '4722123';

SELECT c_birth_country,count(*)
FROM customer_SOS
group by c_birth_country having count(*)>5 order by count(*) desc;

ALTER SESSION SET USE_CACHED_RESULT = FALSE;


ALTER WAREHOUSE COMPUTE_WH SUSPEND;

ALTER WAREHOUSE COMPUTE_WH RESUME;

You might also like