If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > set explain on

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-27-03, 13:29
darryl2468 darryl2468 is offline
Registered User
 
Join Date: Aug 2003
Posts: 4
Unhappy set explain on

I am looking for a way to retrieve the "set explain on" results (usually in sqexplain.out) without writing to the file. My sql statements are executed via a cgi script and therefore, the user does not necessarily have an account to write to.

Also, I have not been able to execute a prepared compound sql statment that includes the "set explain on" statement followed by a select statement. Any insights?
Ex: $sth = $dbh->prepare("set explain on;
select * from tablename where field < condition;
set explain off");
$sth->execute();
Reply With Quote
  #2 (permalink)  
Old 08-29-03, 06:19
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Re: set explain on

Quote:
Originally posted by darryl2468
I am looking for a way to retrieve the "set explain on" results (usually in sqexplain.out) without writing to the file. My sql statements are executed via a cgi script and therefore, the user does not necessarily have an account to write to.

Also, I have not been able to execute a prepared compound sql statment that includes the "set explain on" statement followed by a select statement. Any insights?
Ex: $sth = $dbh->prepare("set explain on;
select * from tablename where field < condition;
set explain off");
$sth->execute();
"set explain on" is a SQL Plus command; I would not expect it to work in a prepared statement - its is not SQL or PL/SQL.
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On