Is Explain Plan is Heavy weight query or Light weight Query.

Database
Enthusiast

Is Explain Plan is Heavy weight query or Light weight Query.

for our use case I need to validate the SQL before submitting to teradata in BTEQ mode in an automated fashion.

I am planning to do EXPLAIN Plan for all the queries before executing them.

Per day the SQL files will be around 500 to 600 SQL files.

So if I do EXPLAIN PLAN then EXECUTION will leads to any performace issues ? Expert help required.

Will this be a Good Approach for validating SQL. If not some one please help with the better approach.

 

 

 

 

 

  • bteq
  • execution
  • explain plan
  • Teradata
1 REPLY
Junior Contributor

Re: Is Explain Plan is Heavy weight query or Light weight Query.

If you want to Explain just for validation (of correct syntax?) you might run them, too.

There's a a chance that the execution plan will be cached and then there's almost no overhead (check QryLogV.CacheFlag).