O'Reilly logo

Teradata Aster Data by John Nolan, Tom Coffing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8 – Tera-Tom’s Top Tips

“Let me once again explain the rules. Tera-Tom Rules!”

-Tera-Tom fan

Tera-Tom's Top Tips

1. When given a choice between using a join or a subquery, use the join.

2. Change your expression's subselects by moving the subselect from the WHERE clause to the FROM clause or by rewriting it as a join.

3. Use an inner subquery to shrink the size of data on which outer queries needs to operate. Likewise, use an inner subquery to shrink the size of a relation before the data is redistributed on a different distribution key.

4. Avoid per-row functions or delay them. Group rows first, and then apply the function.

5. Avoid doing JOINs, GROUP BYs, and WHERE clauses on data types that are non-native.

6. EXPLAIN should be used ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required