SET EXPLAIN FILE TO
Posted in 2008
A user on IDS 11.10 (Solaris 10) couldn't get SET EXPLAIN FILE TO to work, hitting syntax errors with an unquoted path, and asked whether the explain file could be written to a remote server. The answer: quote the path, e.g. SET EXPLAIN FILE TO '/usr/informix/explain.out'; the file is written by the engine locally, so no remote host can be named, though an NFS-mounted filesystem works. Contributors noted FILE TO implicitly enables explain output (SET EXPLAIN ON is only needed for AVOID_EXECUTE), and that older IDS versions restricted FILE TO. A side question about explain files owned by root went unresolved. The original poster thanked everyone.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Platform-Specific Issues
Hello, IDS 11.10 FC2W1 on solaris 10 Could any one pls help me with the exact syntax for SET EXPLAIN FILE TO option. I want the explain plan file to be created at /usr/informix/ with file name as explain.out. Can i create this file on another server? ie create the explain plan file at testdb:/usr/informix/explain.out where "testdb" is a remote server ( accessible form the host server where the SET EXPLAIN FILE TO is run). Regards vikas.
Don't be so lazy, RTFM. It's in the Guide to SQL Syntax Guide under the SQL tab. On your last, you cannot specify a remote location, but an NFS mounted filesystem will work fine. Art On Tue, Jul 29, 2008 at 10:57 AM, VIKAS HIVARKAR <vikas.hivarkar@tcs.com>wrote: > Hello, > > IDS 11.10 FC2W1 on solaris 10 > > Could any one pls help me with the exact syntax for SET EXPLAIN FILE TO > option. > > I want the explain plan file to be created at /usr/informix/ with file name > as > explain.out. > > Can i create this file on another server? ie create the explain plan file > at > testdb:/usr/informix/explain.out where "testdb" is a remote server ( > accessible form the host server where the SET EXPLAIN FILE TO is run). > > Regards > vikas. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
Thank you for your reply Mr Kagel!
I was reading the document (not so lazy)and found this option and tried to
execute it but did not worked, i am sure there is some syntax that i am
missing.
IBM Informix Guide to SQL: Syntax
Previous Page | Next Page | Index SQL Statements > SET EXPLAIN >
Using the FILE TO Option
When you execute a SET EXPLAIN FILE TO statement, explain output is implicitly
turned on. The default filename for the output is sqexplain.out until changed
by a SET EXPLAIN FILE TO statement. Once changed, the filename remains set
until the end of the session or until changed by another SET EXPLAIN FILE TO
statement.
The filename can be any valid combination of optional path and filename. If no
path component is specified, the file is placed in your current directory. The
permissions for the file are owned by the current user.
I tried with SET EXPLAIN FILE TO /usr/informix/explain.out;
select * from emp;
but kept on getting syntax error.
Or may be i am not having the manual that you want me to refer.
Any ways thanks again for your reply to my last point, i will try few more
systax's before i get it right.
Regards,
vikas
>Don't be so lazy, RTFM. It's in the Guide to SQL Syntax Guide under the SQL
>tab. On your last, you cannot specify a remote location, but an NFS mounted
>filesystem will work fine.
>Art
Appreciate the effort to scan the manuals. IB you have to quote the file
path, try:
SET EXPLAIN FILE TO '/usr/informix/explain.out';
Also you still have to run SET EXPLAIN ON; in addition to naming the file
location before it will record the explain plan details in the file for
queries.
Art
On Tue, Jul 29, 2008 at 11:35 AM, VIKAS HIVARKAR <vikas.hivarkar@tcs.com>wrote:
> Thank you for your reply Mr Kagel!
>
> I was reading the document (not so lazy)and found this option and tried to
> execute it but did not worked, i am sure there is some syntax that i am
> missing.
>
> IBM Informix Guide to SQL: Syntax
> Previous Page | Next Page | Index SQL Statements > SET EXPLAIN >
> Using the FILE TO Option
> When you execute a SET EXPLAIN FILE TO statement, explain output is
> implicitly
> turned on. The default filename for the output is sqexplain.out until
> changed
> by a SET EXPLAIN FILE TO statement. Once changed, the filename remains set
> until the end of the session or until changed by another SET EXPLAIN FILE
> TO
> statement.
>
> The filename can be any valid combination of optional path and filename. If
> no
> path component is specified, the file is placed in your current directory.
> The
> permissions for the file are owned by the current user.
>
> I tried with SET EXPLAIN FILE TO /usr/informix/explain.out;
> select * from emp;>
> but kept on getting syntax error.
> Or may be i am not having the manual that you want me to refer.
> Any ways thanks again for your reply to my last point, i will try few more
> systax's before i get it right.
>
> Regards,
> vikas
>
> >Don't be so lazy, RTFM. It's in the Guide to SQL Syntax Guide under the
> SQL
> >tab. On your last, you cannot specify a remote location, but an NFS
> mounted
> >filesystem will work fine.
>
> >Art
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do those
opinions reflect those of other individuals affiliated with any entity with
which I am affiliated nor those of the entities themselves.
From the 10.0 version of the fine manual: SET EXPLAIN [xps only] FILE
TO... The version 11.5 manual doesn't list this restriction. So... if
you want to change your file location, install IDS 11.
--EEM
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
Art Kagel
Sent: Tuesday, July 29, 2008 10:51 AM
To: ids@iiug.org
Subject: Re: SET EXPLAIN FILE TO [12945]
Appreciate the effort to scan the manuals. IB you have to quote the file
path, try:
SET EXPLAIN FILE TO '/usr/informix/explain.out';
Also you still have to run SET EXPLAIN ON; in addition to naming the
file
location before it will record the explain plan details in the file for
queries.
Art
On Tue, Jul 29, 2008 at 11:35 AM, VIKAS HIVARKAR
<vikas.hivarkar@tcs.com>wrote:
> Thank you for your reply Mr Kagel!
>
> I was reading the document (not so lazy)and found this option and
tried to
> execute it but did not worked, i am sure there is some syntax that i
am
> missing.
>
> IBM Informix Guide to SQL: Syntax
> Previous Page | Next Page | Index SQL Statements > SET EXPLAIN >
> Using the FILE TO Option
> When you execute a SET EXPLAIN FILE TO statement, explain output is
> implicitly
> turned on. The default filename for the output is sqexplain.out until
> changed
> by a SET EXPLAIN FILE TO statement. Once changed, the filename remains
set
> until the end of the session or until changed by another SET EXPLAIN
FILE
> TO
> statement.
>
> The filename can be any valid combination of optional path and
filename. If
> no
> path component is specified, the file is placed in your current
directory.
> The
> permissions for the file are owned by the current user.
>
> I tried with SET EXPLAIN FILE TO /usr/informix/explain.out;
> select * from emp;>
> but kept on getting syntax error.
> Or may be i am not having the manual that you want me to refer.
> Any ways thanks again for your reply to my last point, i will try few
more
> systax's before i get it right.
>
> Regards,
> vikas
>
> >Don't be so lazy, RTFM. It's in the Guide to SQL Syntax Guide under
the
> SQL
> >tab. On your last, you cannot specify a remote location, but an NFS
> mounted
> >filesystem will work fine.
>
> >Art
>
>
>
>
************************************************************************
*******
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions
and
do not reflect on my employer, Oninit, the IIUG, nor any other
organization
with which I am associated either explicitly or implicitly. Neither do
those
opinions reflect those of other individuals affiliated with any entity
with
which I am affiliated nor those of the entities themselves.
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
Art:
Here's an odd ball... The permissions on the file are generated with a root
ID of 0 for owner and an unusual group ID (not mine for either!). They are
-rw-rw-r-- and I can't delete it when I'm done with it!
IFORMIX-SQL V: 7.30.FC7
Rob
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Art
Kagel
Sent: Tuesday, July 29, 2008 10:51 AM
To: ids@iiug.org
Subject: Re: SET EXPLAIN FILE TO [12945]
Appreciate the effort to scan the manuals. IB you have to quote the file
path, try:
SET EXPLAIN FILE TO '/usr/informix/explain.out';
Also you still have to run SET EXPLAIN ON; in addition to naming the file
location before it will record the explain plan details in the file for
queries.
Art
On Tue, Jul 29, 2008 at 11:35 AM, VIKAS HIVARKAR
<vikas.hivarkar@tcs.com>wrote:
> Thank you for your reply Mr Kagel!
>
> I was reading the document (not so lazy)and found this option and tried to
> execute it but did not worked, i am sure there is some syntax that i am
> missing.
>
> IBM Informix Guide to SQL: Syntax
> Previous Page | Next Page | Index SQL Statements > SET EXPLAIN >
> Using the FILE TO Option
> When you execute a SET EXPLAIN FILE TO statement, explain output is
> implicitly
> turned on. The default filename for the output is sqexplain.out until
> changed
> by a SET EXPLAIN FILE TO statement. Once changed, the filename remains set
> until the end of the session or until changed by another SET EXPLAIN FILE
> TO
> statement.
>
> The filename can be any valid combination of optional path and filename.
If
> no
> path component is specified, the file is placed in your current directory.
> The
> permissions for the file are owned by the current user.
>
> I tried with SET EXPLAIN FILE TO /usr/informix/explain.out;
> select * from emp;>
> but kept on getting syntax error.
> Or may be i am not having the manual that you want me to refer.
> Any ways thanks again for your reply to my last point, i will try few more
> systax's before i get it right.
>
> Regards,
> vikas
>
> >Don't be so lazy, RTFM. It's in the Guide to SQL Syntax Guide under the
> SQL
> >tab. On your last, you cannot specify a remote location, but an NFS
> mounted
> >filesystem will work fine.
>
> >Art
>
>
>
>
****************************************************************************
***
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do those
opinions reflect those of other individuals affiliated with any entity with
which I am affiliated nor those of the entities themselves.
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
Hi Vikas
The file name has to be quoted..
such as SET EXPLAIN FILE TO '/tmp/yourexplain.out';
--- On Tue, 7/29/08, VIKAS HIVARKAR <vikas.hivarkar@tcs.com> wrote:
> From: VIKAS HIVARKAR <vikas.hivarkar@tcs.com>
> Subject: Re: SET EXPLAIN FILE TO [12942]
> To: ids@iiug.org
> Date: Tuesday, July 29, 2008, 10:35 AM
> Thank you for your reply Mr Kagel!
>
> I was reading the document (not so lazy)and found this
> option and tried to
> execute it but did not worked, i am sure there is some
> syntax that i am
> missing.
>
> IBM Informix Guide to SQL: Syntax
> Previous Page | Next Page | Index SQL Statements > SET
> EXPLAIN >
> Using the FILE TO Option
> When you execute a SET EXPLAIN FILE TO statement, explain
> output is implicitly
> turned on. The default filename for the output is
> sqexplain.out until changed
> by a SET EXPLAIN FILE TO statement. Once changed, the
> filename remains set
> until the end of the session or until changed by another
> SET EXPLAIN FILE TO> statement.
>
> The filename can be any valid combination of optional path
> and filename. If no
> path component is specified, the file is placed in your
> current directory. The
> permissions for the file are owned by the current user.
>
> I tried with SET EXPLAIN FILE TO /usr/informix/explain.out;
>
> select * from emp;>
> but kept on getting syntax error.
> Or may be i am not having the manual that you want me to
> refer.
> Any ways thanks again for your reply to my last point, i
> will try few more
> systax's before i get it right.
>
> Regards,
> vikas
>
> >Don't be so lazy, RTFM. It's in the Guide to
> SQL Syntax Guide under the SQL
> >tab. On your last, you cannot specify a remote
> location, but an NFS mounted
> >filesystem will work fine.
>
> >Art
>
>
>
*******************************************************************************
>
> Forum Note: Use "Reply" to post a response in
> the discussion forum.
SET EXPLAIN FILE TO will active this function so it is not necessary to run
SET EXPLAIN ON again.
Regards,
--- On Tue, 7/29/08, Everett Mills <eemills@nationalbeef.com> wrote:
> From: Everett Mills <eemills@nationalbeef.com>
> Subject: RE: SET EXPLAIN FILE TO [12946]
> To: ids@iiug.org
> Date: Tuesday, July 29, 2008, 11:15 AM
> >From the 10.0 version of the fine manual: SET EXPLAIN
> [xps only] FILE
> TO... The version 11.5 manual doesn't list this
> restriction. So... if
> you want to change your file location, install IDS 11.
>
> --EEM
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On
> Behalf Of
> Art Kagel
> Sent: Tuesday, July 29, 2008 10:51 AM
> To: ids@iiug.org
> Subject: Re: SET EXPLAIN FILE TO [12945]
>
> Appreciate the effort to scan the manuals. IB you have to
> quote the file
>
> path, try:
>
> SET EXPLAIN FILE TO '/usr/informix/explain.out';>
> Also you still have to run SET EXPLAIN ON; in addition to
> naming the
> file
> location before it will record the explain plan details in
> the file for
> queries.
>
> Art
>
> On Tue, Jul 29, 2008 at 11:35 AM, VIKAS HIVARKAR
> <vikas.hivarkar@tcs.com>wrote:
>
> > Thank you for your reply Mr Kagel!
> >
> > I was reading the document (not so lazy)and found this
> option and
> tried to
> > execute it but did not worked, i am sure there is some
> syntax that i
> am
> > missing.
> >
> > IBM Informix Guide to SQL: Syntax
> > Previous Page | Next Page | Index SQL Statements >
> SET EXPLAIN >
> > Using the FILE TO Option
> > When you execute a SET EXPLAIN FILE TO statement,> explain output is
> > implicitly
> > turned on. The default filename for the output is
> sqexplain.out until
> > changed
> > by a SET EXPLAIN FILE TO statement. Once changed, the
> filename remains
> set
> > until the end of the session or until changed by
> another SET EXPLAIN
> FILE
> > TO
> > statement.
> >
> > The filename can be any valid combination of optional
> path and
> filename. If
> > no
> > path component is specified, the file is placed in
> your current
> directory.
> > The
> > permissions for the file are owned by the current
> user.
> >
> > I tried with SET EXPLAIN FILE TO
> /usr/informix/explain.out;
> > select * from emp;> >
> > but kept on getting syntax error.
> > Or may be i am not having the manual that you want me
> to refer.
> > Any ways thanks again for your reply to my last point,
> i will try few
> more
> > systax's before i get it right.
> >
> > Regards,
> > vikas
> >
> > >Don't be so lazy, RTFM. It's in the Guide
> to SQL Syntax Guide under
> the
> > SQL
> > >tab. On your last, you cannot specify a remote
> location, but an NFS
> > mounted
> > >filesystem will work fine.
> >
> > >Art
> >
> >
> >
> >
> ************************************************************************
>
> *******
> > Forum Note: Use "Reply" to post a response
> in the discussion forum.
> >
> >
>
> --
> Art S. Kagel
> Oninit (www.oninit.com)
> IIUG Board of Directors (art@iiug.org)
>
> Disclaimer: Please keep in mind that my own opinions are my
> own opinions
> and
> do not reflect on my employer, Oninit, the IIUG, nor any
> other
> organization
> with which I am associated either explicitly or implicitly.
> Neither do
> those
> opinions reflect those of other individuals affiliated with
> any entity
> with
> which I am affiliated nor those of the entities themselves.
>
>
> ************************************************************************
>
> *******
> Forum Note: Use "Reply" to post a response in the
> discussion forum.
>
>
>
*******************************************************************************
>
> Forum Note: Use "Reply" to post a response in
> the discussion forum.
Art is correct - you must quote the path.
But you don't need to run SET EXPLAIN ON. It's automatically turned on
with the SET EXPLAIN FILE TO ... statement.
The only time you really need to run two statements is when using SET
EXPLAIN FILE TO and AVOID_EXECUTE:
SET EXPLAIN FILE TO '/usr/informix/explain.out';
SET EXPLAIN ON AVOID_EXECUTE;
SELECT ...
But then you lose the explain stats.
Regards,
Mike
Mike Lowe
Education Planning and Development
IBM Information Management
(303) 225-5440 t/l 273-2438
mike.lowe@us.ibm.com
ibm.com/software/data/education
ids-bounces@iiug.org wrote on 07/29/2008 09:50:57 AM:
> Appreciate the effort to scan the manuals. IB you have to quote the file
> path, try:
>
> SET EXPLAIN FILE TO '/usr/informix/explain.out';>
> Also you still have to run SET EXPLAIN ON; in addition to naming the
file
> location before it will record the explain plan details in the file for
> queries.
>
> Art
>
> On Tue, Jul 29, 2008 at 11:35 AM, VIKAS HIVARKAR
> <vikas.hivarkar@tcs.com>wrote:
>
> > Thank you for your reply Mr Kagel!
> >
> > I was reading the document (not so lazy)and found this option and
tried to
> > execute it but did not worked, i am sure there is some syntax that i
am
> > missing.
> >
> > IBM Informix Guide to SQL: Syntax
> > Previous Page | Next Page | Index SQL Statements > SET EXPLAIN >
> > Using the FILE TO Option
> > When you execute a SET EXPLAIN FILE TO statement, explain output is
> > implicitly
> > turned on. The default filename for the output is sqexplain.out until
> > changed
> > by a SET EXPLAIN FILE TO statement. Once changed, the filename remains
set
> > until the end of the session or until changed by another SET EXPLAIN
FILE
> > TO
> > statement.
> >
> > The filename can be any valid combination of optional path and
filename. If
> > no
> > path component is specified, the file is placed in your current
directory.
> > The
> > permissions for the file are owned by the current user.
> >
> > I tried with SET EXPLAIN FILE TO /usr/informix/explain.out;
> > select * from emp;> >
> > but kept on getting syntax error.
> > Or may be i am not having the manual that you want me to refer.
> > Any ways thanks again for your reply to my last point, i will try few
more
> > systax's before i get it right.
> >
> > Regards,
> > vikas
> >
> > >Don't be so lazy, RTFM. It's in the Guide to SQL Syntax Guide under
the
> > SQL
> > >tab. On your last, you cannot specify a remote location, but an NFS
> > mounted
> > >filesystem will work fine.
> >
> > >Art
> >
> >
> >
> >
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --
> Art S. Kagel
> Oninit (www.oninit.com)
> IIUG Board of Directors (art@iiug.org)
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions
and
> do not reflect on my employer, Oninit, the IIUG, nor any other
organization
> with which I am associated either explicitly or implicitly. Neither do
those
> opinions reflect those of other individuals affiliated with any entity
with
> which I am affiliated nor those of the entities themselves.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Probably a side effect of running IDS as root instead of as user
'informix'. I don't know.
Art
On Tue, Jul 29, 2008 at 12:41 PM, Konikoff, Robert W MAJ RET <
rob.konikoff@us.army.mil> wrote:
> Art:
>
> Here's an odd ball... The permissions on the file are generated with a root
> ID of 0 for owner and an unusual group ID (not mine for either!). They are
> -rw-rw-r-- and I can't delete it when I'm done with it!
>
> IFORMIX-SQL V: 7.30.FC7
>
> Rob
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Art
> Kagel
> Sent: Tuesday, July 29, 2008 10:51 AM
> To: ids@iiug.org
> Subject: Re: SET EXPLAIN FILE TO [12945]
>
> Appreciate the effort to scan the manuals. IB you have to quote the file
> path, try:
>
> SET EXPLAIN FILE TO '/usr/informix/explain.out';>
> Also you still have to run SET EXPLAIN ON; in addition to naming the file
> location before it will record the explain plan details in the file for
> queries.
>
> Art
>
> On Tue, Jul 29, 2008 at 11:35 AM, VIKAS HIVARKAR
> <vikas.hivarkar@tcs.com>wrote:
>
> > Thank you for your reply Mr Kagel!
> >
> > I was reading the document (not so lazy)and found this option and tried
> to
>
> > execute it but did not worked, i am sure there is some syntax that i am
> > missing.
> >
> > IBM Informix Guide to SQL: Syntax
> > Previous Page | Next Page | Index SQL Statements > SET EXPLAIN >
> > Using the FILE TO Option
> > When you execute a SET EXPLAIN FILE TO statement, explain output is
> > implicitly
> > turned on. The default filename for the output is sqexplain.out until
> > changed
> > by a SET EXPLAIN FILE TO statement. Once changed, the filename remains
> set
>
> > until the end of the session or until changed by another SET EXPLAIN FILE
> > TO
> > statement.
> >
> > The filename can be any valid combination of optional path and filename.
> If
> > no
> > path component is specified, the file is placed in your current
> directory.
>
> > The
> > permissions for the file are owned by the current user.
> >
> > I tried with SET EXPLAIN FILE TO /usr/informix/explain.out;
> > select * from emp;> >
> > but kept on getting syntax error.
> > Or may be i am not having the manual that you want me to refer.
> > Any ways thanks again for your reply to my last point, i will try few
> more
>
> > systax's before i get it right.
> >
> > Regards,
> > vikas
> >
> > >Don't be so lazy, RTFM. It's in the Guide to SQL Syntax Guide under the
> > SQL
> > >tab. On your last, you cannot specify a remote location, but an NFS
> > mounted
> > >filesystem will work fine.
> >
> > >Art
> >
> >
> >
> >
>
> ****************************************************************************
> ***
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --
> Art S. Kagel
> Oninit (www.oninit.com)
> IIUG Board of Directors (art@iiug.org)
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions
> and
>
> do not reflect on my employer, Oninit, the IIUG, nor any other organization
> with which I am associated either explicitly or implicitly. Neither do
> those
>
> opinions reflect those of other individuals affiliated with any entity with
> which I am affiliated nor those of the entities themselves.
>
>
> ****************************************************************************
> ***
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do those
opinions reflect those of other individuals affiliated with any entity with
which I am affiliated nor those of the entities themselves.
Just to add that IDS 11.50 finally has a functionality to provide a Visual
explain.
It works currently with IBM Data Studio.... Not sure if any other tool has
already taken advantage of this.
And a final thought: This functionality actually returns an XML string...
IDS 11.5 can apply a style sheet to an XML file... Anyone fluent on XSLT
wants to create a StyleSheet to convert XML into plain text, so that remote
dbaccess can get the query plans, without access to the DB server host?
Just a thought... I give it a look, but it's too much XSLT (and time) for
me...
Regards.
On Tue, Jul 29, 2008 at 6:16 PM, Michael Lowe <mike.lowe@us.ibm.com> wrote:
> Art is correct - you must quote the path.
> But you don't need to run SET EXPLAIN ON. It's automatically turned on
> with the SET EXPLAIN FILE TO ... statement.
> The only time you really need to run two statements is when using SET
> EXPLAIN FILE TO and AVOID_EXECUTE:
>
> SET EXPLAIN FILE TO '/usr/informix/explain.out';
> SET EXPLAIN ON AVOID_EXECUTE;
> SELECT ...>
> But then you lose the explain stats.
>
> Regards,
> Mike
> Mike Lowe
> Education Planning and Development
> IBM Information Management
> (303) 225-5440 t/l 273-2438
> mike.lowe@us.ibm.com
> ibm.com/software/data/education
>
> ids-bounces@iiug.org wrote on 07/29/2008 09:50:57 AM:
>
> > Appreciate the effort to scan the manuals. IB you have to quote the file
>
> > path, try:
> >
> > SET EXPLAIN FILE TO '/usr/informix/explain.out';> >
> > Also you still have to run SET EXPLAIN ON; in addition to naming the
> file
> > location before it will record the explain plan details in the file for
> > queries.
> >
> > Art
> >
> > On Tue, Jul 29, 2008 at 11:35 AM, VIKAS HIVARKAR
> > <vikas.hivarkar@tcs.com>wrote:
> >
> > > Thank you for your reply Mr Kagel!
> > >
> > > I was reading the document (not so lazy)and found this option and
> tried to
> > > execute it but did not worked, i am sure there is some syntax that i
> am
> > > missing.
> > >
> > > IBM Informix Guide to SQL: Syntax
> > > Previous Page | Next Page | Index SQL Statements > SET EXPLAIN >
> > > Using the FILE TO Option
> > > When you execute a SET EXPLAIN FILE TO statement, explain output is
> > > implicitly
> > > turned on. The default filename for the output is sqexplain.out until
> > > changed
> > > by a SET EXPLAIN FILE TO statement. Once changed, the filename remains
> set
> > > until the end of the session or until changed by another SET EXPLAIN
> FILE
> > > TO
> > > statement.
> > >
> > > The filename can be any valid combination of optional path and
> filename. If
> > > no
> > > path component is specified, the file is placed in your current
> directory.
> > > The
> > > permissions for the file are owned by the current user.
> > >
> > > I tried with SET EXPLAIN FILE TO /usr/informix/explain.out;
> > > select * from emp;> > >
> > > but kept on getting syntax error.
> > > Or may be i am not having the manual that you want me to refer.
> > > Any ways thanks again for your reply to my last point, i will try few
> more
> > > systax's before i get it right.
> > >
> > > Regards,
> > > vikas
> > >
> > > >Don't be so lazy, RTFM. It's in the Guide to SQL Syntax Guide under
> the
> > > SQL
> > > >tab. On your last, you cannot specify a remote location, but an NFS
> > > mounted
> > > >filesystem will work fine.
> > >
> > > >Art
> > >
> > >
> > >
> > >
> >
>
>
>
*******************************************************************************
> > > Forum Note: Use "Reply" to post a response in the discussion forum.
> > >
> > >
> >
> > --
> > Art S. Kagel
> > Oninit (www.oninit.com)
> > IIUG Board of Directors (art@iiug.org)
> >
> > Disclaimer: Please keep in mind that my own opinions are my own opinions
> and
> > do not reflect on my employer, Oninit, the IIUG, nor any other
> organization
> > with which I am associated either explicitly or implicitly. Neither do
> those
> > opinions reflect those of other individuals affiliated with any entity
> with
> > which I am affiliated nor those of the entities themselves.
> >
> >
> >
>
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
Which is the IDS version? and what platform?
The file is written by the engine, not the client tool.
Are you using role separation?
On Tue, Jul 29, 2008 at 5:41 PM, Konikoff, Robert W MAJ RET <
rob.konikoff@us.army.mil> wrote:
> Art:
>
> Here's an odd ball... The permissions on the file are generated with a root
> ID of 0 for owner and an unusual group ID (not mine for either!). They are
> -rw-rw-r-- and I can't delete it when I'm done with it!
>
> IFORMIX-SQL V: 7.30.FC7
>
> Rob
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Art
> Kagel
> Sent: Tuesday, July 29, 2008 10:51 AM
> To: ids@iiug.org
> Subject: Re: SET EXPLAIN FILE TO [12945]
>
> Appreciate the effort to scan the manuals. IB you have to quote the file
> path, try:
>
> SET EXPLAIN FILE TO '/usr/informix/explain.out';>
> Also you still have to run SET EXPLAIN ON; in addition to naming the file
> location before it will record the explain plan details in the file for
> queries.
>
> Art
>
> On Tue, Jul 29, 2008 at 11:35 AM, VIKAS HIVARKAR
> <vikas.hivarkar@tcs.com>wrote:
>
> > Thank you for your reply Mr Kagel!
> >
> > I was reading the document (not so lazy)and found this option and tried
> to
>
> > execute it but did not worked, i am sure there is some syntax that i am
> > missing.
> >
> > IBM Informix Guide to SQL: Syntax
> > Previous Page | Next Page | Index SQL Statements > SET EXPLAIN >
> > Using the FILE TO Option
> > When you execute a SET EXPLAIN FILE TO statement, explain output is
> > implicitly
> > turned on. The default filename for the output is sqexplain.out until
> > changed
> > by a SET EXPLAIN FILE TO statement. Once changed, the filename remains
> set
>
> > until the end of the session or until changed by another SET EXPLAIN FILE
> > TO
> > statement.
> >
> > The filename can be any valid combination of optional path and filename.
> If
> > no
> > path component is specified, the file is placed in your current
> directory.
>
> > The
> > permissions for the file are owned by the current user.
> >
> > I tried with SET EXPLAIN FILE TO /usr/informix/explain.out;
> > select * from emp;> >
> > but kept on getting syntax error.
> > Or may be i am not having the manual that you want me to refer.
> > Any ways thanks again for your reply to my last point, i will try few
> more
>
> > systax's before i get it right.
> >
> > Regards,
> > vikas
> >
> > >Don't be so lazy, RTFM. It's in the Guide to SQL Syntax Guide under the
> > SQL
> > >tab. On your last, you cannot specify a remote location, but an NFS
> > mounted
> > >filesystem will work fine.
> >
> > >Art
> >
> >
> >
> >
>
> ****************************************************************************
> ***
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --
> Art S. Kagel
> Oninit (www.oninit.com)
> IIUG Board of Directors (art@iiug.org)
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions
> and
>
> do not reflect on my employer, Oninit, the IIUG, nor any other organization
> with which I am associated either explicitly or implicitly. Neither do
> those
>
> opinions reflect those of other individuals affiliated with any entity with
> which I am affiliated nor those of the entities themselves.
>
>
> ****************************************************************************
> ***
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
Thanks to Mr kagel,Everett,ptang,Fernando and Michael!! Regards Vikas