Monitoring SQL Statements

Onstat -g sql Print SQL Information

This command is one of the most useful features found in onstat in IDS engines. OnLine systems provided no way for you to see exactly which SQL statements were being executed at any particular time. This left the DBA in the dark when trying to see exactly which SQL statements may be hogging system resources and bringing the system to its knees.

Users who are running ad hoc queries in OLTP systems are going to do bad SELECTS no matter how well you train them. A bad SELECT is defined as any SELECT statement that hogs a lot of the system resources. These can be such things as non-indexed reads against large tables resulting in sequential scans, disjoint queries that return a Cartesian ...

Get Informix DBA Survival Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.