Re: Catching runnig SQLs
Posted in 2004
Topics: Performance & Tuning, Platform-Specific Issues
curtis@crowson1.com (Curtis Crowson) writes:
> "Shevkar, Mukund" <mshevkar@hp.com> wrote in message news:<cfc68q$802$1@news.xmission.com>...
>> Hi
>> I want to catch running SQLs with their memory usage, time it was started and ended alongiwth username ,session id and if possible any information on unix pid. Is their a standard routine , script available for this? how can I do this?
>> Connections are over TCP and shared memory too.
>> Informix 7.31, HP-UX 11x
>>
>> Mukund
>>
>> sending to informix-list
>
> There are two sysmaster tables:
>
> syssqlcurses, and sysqexplain these should have all of the information
> that you can get from informix.
>
> to view current executing sql:
>
> select * from syssqexplain, sysscblst where sqx_sessionid = sid> ;
>
> A little experimenting and you can figure out what is going on with
> the tables.
Is this the same in 9.X as well, and for X in (21,30,40)?
Oyvind Gjerstad <ogj@tollpost.no> wrote in message news:<r7pyezhu.fsf@tollpost.no>...
> curtis@crowson1.com (Curtis Crowson) writes:
>
> > "Shevkar, Mukund" <mshevkar@hp.com> wrote in message news:<cfc68q$802$1@news.xmission.com>...
> >> Hi
> >> I want to catch running SQLs with their memory usage, time it was started and ended alongiwth username ,session id and if possible any information on unix pid. Is their a standard routine , script available for this? how can I do this?
> >> Connections are over TCP and shared memory too.
> >> Informix 7.31, HP-UX 11x
> >>
> >> Mukund
> >>
> >> sending to informix-list
> >
> > There are two sysmaster tables:
> >
> > syssqlcurses, and sysqexplain these should have all of the information
> > that you can get from informix.
> >
> > to view current executing sql:
> >
> > select * from syssqexplain, sysscblst where sqx_sessionid = sid> > ;
> >
> > A little experimenting and you can figure out what is going on with
> > the tables.
>
> Is this the same in 9.X as well, and for X in (21,30,40)?
It is the same for 9.x because I do it on my 9.x database. I don't
know about X. But there will be some sysmaster table that does it. I
have a script that searches for columns names like an input column
name. so I would look for columns like "sql" and then look at the
build sysmaster sql. I then try it on a test database to see if what I
think is happening is actually happening.
select t.tabname, c.colname from systables t, syscolumns c wherecolname like "%sql%" ;
Wrap the above query with the appropriate shell commands and you have
find_col.
Oyvind Gjerstad <ogj@tollpost.no> wrote in message news:<r7pyezhu.fsf@tollpost.no>...
> curtis@crowson1.com (Curtis Crowson) writes:
>
> > "Shevkar, Mukund" <mshevkar@hp.com> wrote in message news:<cfc68q$802$1@news.xmission.com>...
> >> Hi
> >> I want to catch running SQLs with their memory usage, time it was started and ended alongiwth username ,session id and if possible any information on unix pid. Is their a standard routine , script available for this? how can I do this?
> >> Connections are over TCP and shared memory too.
> >> Informix 7.31, HP-UX 11x
> >>
> >> Mukund
> >>
> >> sending to informix-list
> >
> > There are two sysmaster tables:
> >
> > syssqlcurses, and sysqexplain these should have all of the information
> > that you can get from informix.
> >
> > to view current executing sql:
> >
> > select * from syssqexplain, sysscblst where sqx_sessionid = sid> > ;
> >
> > A little experimenting and you can figure out what is going on with
> > the tables.
>
> Is this the same in 9.X as well, and for X in (21,30,40)?
Ooops I read the X wrong. I am running 9.21 so it is the same. I think
it is for 30, and 40 also but I don't actually know. Again just search
syscolumns and do some experimenting.