use tpcds_holodesk_10000;

--set inceptor.optimizer.on=true;
analyze table catalog_sales partition p2 compute statistics for columns; 
analyze table catalog_returns partition p2 compute statistics for columns; 
analyze table store_sales partition p2 compute statistics for columns; 
analyze table store_returns partition p2 compute statistics for columns; 
analyze table web_sales partition p2 compute statistics for columns; 
analyze table web_returns partition p2 compute statistics for columns; 
analyze table inventory partition p2 compute statistics for columns; 


analyze table call_center compute statistics;
analyze table call_center compute statistics for columns cc_call_center_id,cc_county,cc_manager,cc_call_center_sk,cc_name;
analyze table catalog_page compute statistics;
analyze table catalog_page compute statistics for columns cp_catalog_page_id,cp_catalog_page_sk;
analyze table catalog_returns compute statistics;
analyze table catalog_sales compute statistics;
analyze table customer_address compute statistics;
analyze table customer_address compute statistics for columns ca_street_number,ca_city,ca_county,ca_gmt_offset,ca_state,ca_suite_number,ca_country,ca_zip,ca_address_sk,ca_street_name,ca_location_type,ca_street_type;
analyze table customer compute statistics;
analyze table customer compute statistics for columns c_last_review_date_sk,c_customer_id,c_email_address,c_login,c_first_sales_date_sk,c_preferred_cust_flag,c_first_shipto_date_sk,c_birth_day,c_customer_sk,c_first_name,c_birth_year,c_birth_month,c_current_hdemo_sk,c_last_name,c_current_addr_sk,c_birth_country,c_salutation,c_current_cdemo_sk;
analyze table customer_demographics compute statistics;
analyze table customer_demographics compute statistics for columns cd_credit_rating,cd_marital_status,cd_dep_count,cd_education_status,cd_demo_sk,cd_purchase_estimate,cd_gender,cd_dep_college_count,cd_dep_employed_count;
analyze table date_dim compute statistics;
analyze table date_dim compute statistics for columns d_dom,d_day_name,d_dow,d_moy,d_week_seq,d_year,d_quarter_name,d_date,d_qoy,d_date_sk,d_month_seq;
analyze table household_demographics compute statistics;
analyze table household_demographics compute statistics for columns hd_demo_sk,hd_vehicle_count,hd_income_band_sk,hd_dep_count,hd_buy_potential;
analyze table income_band compute statistics;
analyze table income_band compute statistics for columns ib_income_band_sk,ib_lower_bound,ib_upper_bound;
analyze table inventory compute statistics;
analyze table item compute statistics;
analyze table item compute statistics for columns i_item_desc,i_manufact,i_size,i_wholesale_cost,i_item_id,i_manager_id,i_units,i_category,i_brand_id,i_product_name,i_class,i_item_sk,i_manufact_id,i_class_id,i_current_price,i_brand,i_color,i_category_id;
analyze table promotion compute statistics;
analyze table promotion compute statistics for columns p_channel_tv,p_promo_sk,p_channel_dmail,p_channel_event,p_channel_email;
analyze table reason compute statistics;
analyze table reason compute statistics for columns r_reason_desc,r_reason_sk;
analyze table ship_mode compute statistics;
analyze table ship_mode compute statistics for columns sm_ship_mode_sk,sm_type,sm_carrier;
analyze table store compute statistics;
analyze table store compute statistics for columns s_store_id,s_state,s_street_name,s_city,s_street_type,s_zip,s_company_name,s_store_sk,s_gmt_offset,s_number_employees,s_company_id,s_store_name,s_county,s_suite_number,s_street_number, s_market_id;
analyze table store_returns compute statistics;
analyze table store_sales compute statistics;
analyze table time_dim compute statistics;
analyze table time_dim compute statistics for columns t_meal_time,t_minute,t_time_sk,t_hour,t_time;
analyze table warehouse compute statistics;
analyze table warehouse compute statistics for columns w_country,w_state,w_warehouse_sk,w_county,w_warehouse_name,w_warehouse_sq_ft,w_city;
analyze table web_page compute statistics;
analyze table web_page compute statistics for columns wp_web_page_sk,wp_char_count;
analyze table web_returns compute statistics;
analyze table web_sales compute statistics;
analyze table web_site compute statistics;
analyze table web_site compute statistics for columns web_name,web_company_name,web_site_id,web_site_sk;
