query using cpu
Posted in 2006
Topics: SQL Development & Query Writing
Any idea why a query that does a join of a table on itself, doing a count and a group by, would cause the cpu usage to go drastically up, almost instantly ? Not pdq, just a query, on a non fragged table. ======================== -<<Floyd Wellershaus>>- Database Administrator Unix Administrator email: fwellers@yahoo.com Home: 703-430-0805 Cell: 703-477-6045 ======================== http://www.one.org/
Floyd Wellershaus wrote:
> Any idea why a query that does a join of a table on itself, doing a count and a group by, would cause the cpu usage to go drastically up, almost instantly ? Not pdq, just a query, on a non fragged table.
>
>
It is doing multiple sequential scans of the table. All the table is
cached in the buffers hence no disk i/o hence cpu usage
flies up.
1. Query sysmaster:syssesprof to find the session causing the problem
and watch its bufreads count flying up!
OR
2. onstat -g ses , get the thread id for the thread and check the
output from onstat -g tpf for the thread
!!
That's exactly it. I knew I was missing something.
Thank for the response !!
========================
-<<Floyd Wellershaus>>-
Database Administrator
Unix Administrator
email: fwellers@yahoo.com
Home: 703-430-0805
Cell: 703-477-6045
========================
http://www.one.org/
----- Original Message ----
From: david@smooth1.co.uk
To: informix-list@iiug.org
Sent: Friday, August 11, 2006 4:59:57 PM
Subject: Re: query using cpu
Floyd Wellershaus wrote:
> Any idea why a query that does a join of a table on itself, doing a count and a group by, would cause the cpu usage to go drastically up, almost instantly ? Not pdq, just a query, on a non fragged table.
>
>
It is doing multiple sequential scans of the table. All the table is
cached in the buffers hence no disk i/o hence cpu usage
flies up.
1. Query sysmaster:syssesprof to find the session causing the problem
and watch its bufreads count flying up!
OR
2. onstat -g ses , get the thread id for the thread and check the
output from onstat -g tpf for the thread
!!
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list