title: Snowflake joins performance improvement
body: <p>I need to create a view on top of a table which contains 1300+ columns. New data will be loaded to table every quarter(Rows in millions). While creating view I need to join other table with the base table. and i also needed to add a recent row indicator in view.</p>
  <pre><code>CREATE OR REPLACE SECURE VIEW VIEW_NAME AS
  SELECT lkp_tbl.col1,base_tbl.col1,base_tbl.col2,base_tbl.col3,........,
  base_tbl.col1334, 1 as Is_Latest_Quarter 
  FROM base_tbl full outer JOIN lkp_tbl
  on base_tbl.CUST_ID = lkp_tbl.CUST_ID 
  where snapshot_dt=(select max(snapshot_dt) from base_tbl)
  
  
  union all
  
  
  SELECT lkp_tbl.col1,base_tbl.col1,base_tbl.col2,base_tbl.col3,........,
  base_tbl.col1334,0 as Is_Latest_Quarter 
  FROM base_tbl full outer JOIN lkp_tbl 
  on base_tbl.CUST_ID = lkp_tbl.CUST_ID 
  where snapshot_dt!=(select max(snapshot_dt) from base_tbl);
  </code></pre>
  <p>After creating this view the performance of the query is too slow even if we are querying 100 rows. Is there a way in which we can create view in more efficient way. If not how can i increase performance?</p>