Writing queries
Here we will assume that the reader is well versed with Teradata SQL syntax and has all the required tools to connect and execute the queries on Teradata.
Every SQL statement that executes on Teradata database consumes CPU, IO, AWT, and Spool.
Teradata's architecture is based on parallelism, which essentially means the efficiency of the query is based on how parallel efficient the query execution is, meaning how well it could leverage Teradata's parallelism. However, it also has an exception which will be covered in a later part of the chapter.
Getting ready
Teradata has many tools for writing the queries; you can use SQLA or a BTEQ for executing queries. There are also many third-party applications that connect to Teradata database using a data connector such as ODBC, JDBC, or .NET. Data loading utilities such as FastLoad, Multiload, or TPT can also be invoked using BTEQ or third-party apps. Here, we will use SQLA, the simplest of tools, to write a query, and show you how to...