Best Practices for SQLScript

  • Do not mix up SQL statement and CE_* operator within the same script
  • Query should be formulated in such a way that minimizes data transfer between different engines.
  • Avoid implicit type casting
  • Reduce complexity of SQL Statements. It helps in identifying common sub-expression
  • Reduce dependencies between different SQL statement and use declarative constructs to enable parallel execution of SQL statements
  • Executing dynamic SQL is slow because compile time checks and query optimization must be done for every invocation of the procedure.
  • Avoid CURSOR (and other imperative constructs) as parallelization can’t be done
  • Consider the impact of expensive calculations (like unit and currency conversion)

No comments:

Post a Comment