Skip to main content

Optimize queries

Optimize your metrics and validated queries so that they are easier to interpret by Qluent. Often hand-written SQL queries lack clarity and readability that both human and machine users expect. To improve the accessibility of your SQL you can optimize a query.

Not all queries can be immediately optimized. Esnure the original query's columns are included in the order by clause so that the resulting optimised query data can be compared to the original data.

Optimizations

The following optimizations are made tox each query:

  • Reformats the SQL into CTEs for readability
  • Annotates the SQL with comments providing a human readable explanation
  • Improves the names/aliases for clarity
  • Ensures the original and optimized executed SQL yield the same data