Time for teradata query


Time for teradata query

Is there any way to determine how much time will a Teradata sql will take?

So we have a front end which pulls data from Teradata and it takes quite a while due to the nature of the query and the amount of the data and also the speed of the Teradata itself. So wanted to to see if there’s a way to let users know how much time will it take for the results to show up on the screen.


Re: Time for teradata query

Teradata Explain statement estimates the query runtime; It provides an "English" translation of the plan the SQL Optimizer develops to service a request.

explain SELECT *  FROM dbc.tables sample 1;

Result: The estimated time for this step is 0.13 seconds.


Re: Time for teradata query

The "time" in the explain has absolutely no reference to the actual execution time of the query.  The "time" estimates in the explain plan are a measure of how much the query costs.  Don't try to relate the explain plan cost estimates to clock time.

You can use the dbql firststeptimestamp - starttimestamp to see how long the query took.