Results 1 to 2 of 2

Thread: set explain on

  1. #1
    Join Date
    Aug 2003
    Posts
    4

    Unhappy Unanswered: 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();

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: set explain on

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •