How it works...

To begin with query optimization, you first need to identify queries that are impacting and are under performing on system. Tuning efforts can be rewarding when the right queries are identified and captured. Choosing the queries with the greatest work impact is an integral part of performance tuning. You want to spend your time and effort on those queries which have the most return on the time you invest and to make system more stable for others.

The explain plan is the most effective way to optimize any query without its execution. If you are able to read the explain plan correctly and effectively, you can tune your query without any issues. Your business outcome should be in line with explain; if estimated rows are too low ...

Get Teradata Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.