![](//teradataforum.com/imgs/ptdfw1.gif) |
![](//teradataforum.com/imgs/ptdfw2.gif) |
Archives of the TeradataForum
Message Posted: Wed, 02 Feb 2005 @ 11:18:23 GMT
Subj: | | Re: Different Explains for the same query |
|
From: | | Victor Sokovin |
| I am facing a peculiar situation where the SQL when run inside the macro runs in 1 min, but the same query when run as a Macro hangs up.
Basically I am getting a different Explain when I run the SQL inside Queryman (better EXPLAIN) and a different Explain when I put the SQL inside a
macro and run the macro instead. | |
Try to run the query and the macro in bteq. If the explains remain the same, the problem is with the ODBC driver. If so, you can enable
the ODBC tracing and see how the driver translates both requests before submitting them to TD. I second the other poster that for the purpose of
this test you should make sure that the macro contains only one query.
If you still see the difference in explains and run times in bteq, it might be worth publishing more data.
Regards,
Victor
| |