Wednesday, December 16, 2020

Extract: Performance Tips

Below listed some common performance tips for extract queries.
  1. Extract required columns only and specify in the query, avoid select *
  2. Extract required rows only. delta only
  3. Avoid unnecessary sorting operations
    • union vs union all
    • distinct, group by, order by: use only when necessary
  4. Avoid transformation logic in the extract queries. These logic should be offloaded to ETL engine.
  5. Indexes
    • proper where clause; 
      • use AND; 
      • avoid OR/NOT/<>/NOT IN
      • be careful using wildcard and range
    • create proper indexes
    • maintain indexes regularly
  6. Consider "Read uncommitted" (AKA dirty read, NOLOCK). Learn and use it carefully.
  7. Use native utility and driver to execute your query. They are usually tuned for better performance.

No comments:

Post a Comment

Extract: Performance Tips

Below listed some common performance tips for extract queries. Extract required columns only and specify in the query, avoid select * Extrac...