Return plan file from a DB via a passthrough query.

Reply
Occasional Contributor
Posts: 13

Return plan file from a DB via a passthrough query.

I am trying to return a plan file for a query in SAS...How do I take the results and through it into some type of sas object or txt file????

Super Contributor
Posts: 349

Re: Return plan file from a DB via a passthrough query.

Hi,

Try this...Hope it helps..

proc printto log='output-file.txt' ;

run;

options fullstimer;

/*SAS Code or Passthrough code*/

  proc printto;

run;

Thanks,

Shiva

Occasional Contributor
Posts: 13

Re: Return plan file from a DB via a passthrough query.

This will only print the log with SAS's execution times, etc... I am trying to get the plan from the DB by using something similar to the below

proc sql;

     connect to netezza as dbcon

          (server=netezzaServer database=myDB authdomain=netezzaAuth);

               execute(

                                   EXPLAIN SELECT

                                        <insert fancy sql code here>

                              );

quit;

Super User
Super User
Posts: 6,498

Re: Return plan file from a DB via a passthrough query.

Does NETEZZA have syntax for outputting the result of EXPLAIN  into a dataset?  For example with Oracle you can somethings format things as queries from the special null dataset called DUAL.

Ask a Question
Discussion stats
  • 3 replies
  • 231 views
  • 0 likes
  • 3 in conversation