On a Solaris box, we have Informix 9.21 UC5 running. One of the oninit processes is using 35% of the CPU (from top). This has been traced to a ESQL C program doing a select statement. I have used set explain on and run the select--it is using indexes. However, when I do an onstat -z, since yesterday, onstat -p shows more than 30 million seqscans. Yet the seqscans column from sysptprof only shows single digit sequential scans. I was hoping to find out what is causing this query to take so much CPU time. Also, there is nothing in the sysdistrib table, which indicates no update statistics med or high have been run. Is there a way to see when the last update statistics low was run? Any ideas about tracking down this CPU hog, and why the disconnect between onstat -p and the sysmaster table sysptprof seqscan disconnect?
the table sysptprof show only if have active session over the table. If your system open a session, execute a lot of SELECT (what generate sequencial scans), the session is closed and no other session are accessing the table.. the sysptprof are loosed.
With me here , I get a lot sequencial scan on the sysusers table, are a small table and sequencial scan are common and this is not a performance problem .
About get the last update statistics executed, you can get only the med and high on the sysdistrib, low update statistics are not logged in the sysdistrib.
to monitor what the oninit are doing you can monitor with "onstat -g act -r 1". they will show to you all threads are executing.