Hello,
There is a sysmaster table, containing SQL session information, including a
full sql text: syssqexplain
Just explore the fields it contains and you'll found a lot of interesting
stuff.
There is a field , reflecting an approximate cost of the query as well.
I use the following sql to retrieve the top 10 most 'expensive' queries:
select first 10
username,
sqx_sessionid,
sqx_estcost,
sqx_sqlstatement
from syssqexplain, sysscblst
where sqx_sessionid = sid
order by sqx_estcost desc
-- Note that first keyword available starting from IDS 7.30
Hope that was helpful
Regards,
Stav Vennikov
> -----Original Message-----
> From: ricew@operamail.com [SMTP:ricew@operamail.com]
> Sent: Friday, May 05, 2000 10:32 AM
> To: informix-list@iiug.org
> Subject: Re: query for sessions last sql statement
>
> sysconblock even.
> In article <8eulej$tm8$1@nnrp1.deja.com>,
> pyrak@my-deja.com wrote:
> > The syconblock table probably has the info
> > you are looking for
> >
> > Will
> > In article <8eujp8$btv$1@news.mathworks.com>,
> > "Ben Draper" <bdraper@mathworks.com> wrote:
> > > when I query the syssqlstat table for session information I get a
> truncated
> > > version of the sql statment (sqs_statement column only 200 chars)
> > >
> > > Are there any other tables or views ins sysmaster which store the full
> sql
> > > statement. I know I can get this from onstat -g sql/ses but I'd like
> to
> > > access this from a client session.
> > >
> > > Thanks for any help...
> > >
> > >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.