KNOWLEDGE BASE

Teradata DBQL Logs Show Duplicate Queries in Tableau Desktop


Published: 15 Apr 2014
Last Modified Date: 27 Feb 2017

Issue

When viewing Teradata DBQL table logs, Tableau appears to send two identical queries to the Teradata Database.

Environment

  • Tableau Desktop 8.0 and later versions
  • Teradata
  • DBQL Logs

Resolution

The duplicate queries that appear in the DBQL logs are inherent to Teradata prepared statements.

Cause

Tableau 8.0 and later versions use ODBC to connect to Teradata databases.
 
When preparing a query Teradata parsed the query and build a query plan, which can take system resources. The Tableau ODBC protocol uses Teradata prepared statements for the following specific reasons:
 
  • To check the syntactic validity of a query without executing it.
  • To retrieve the metadata of a query without executing it, e.g. to get the names of all columns via "select * from <table>..."
  • To retain a statement handle for supporting query cancellation at a later time.
Did this article resolve the issue?