The Connection Monitor lists the calls the application recently made to a database or a platform, and draws how much of the recent past was spent waiting on them. A statement of Invantive UniversalSQL may cost one call or hundreds, and it is the calls which are waited on; a statement sent to Microsoft SQL Server or Oracle is itself such a call. There is one row per call, not per statement: ![[20260904-qt-connection-monitor.png]] ## Opening It A dot at the right-hand end of the ribbon carries the same measurement as the graph and in the same colour, so the dot is the right-hand edge of the graph. Resting on it says how busy the connections are - "No database or API activity." when nothing runs, and otherwise the share of the last seconds spent waiting together with the number of calls still running. Clicking it opens this window. The window runs on a thread of its own and keeps counting and repainting while the application is busy, which is precisely when it is opened. Closing it stops nothing: what it shows is recorded whether the window is open or not. While the application itself does not answer - a statement running on the window, or a grid reading further rows; see [[Invantive Query Tool/Working with Large Results|Working with Large Results]] - the dot blinks in the colour of that moment rather than freezing at the colour it had, and a click on it opens this window as it otherwise does. The blinking dot is drawn by a window of its own over the place the dot sits. ## The Graph The graph shows the share of each moment spent inside a platform call. A share above one means calls overlapped, which is why the scale runs well past a hundred per cent and carries lines at the boundaries the colour changes at rather than at round numbers. The colours are those of the dot: - green: idle, up to a fifth of the period, which is the housekeeping any connected application does; - yellow: occasional traffic, up to half the period; - orange: busy throughout or lightly parallel, from half the period up to twice it; - red: several calls outstanding throughout, from two to five times the period; - black: five times the period and beyond, which is many threads and much waiting. Green means idle and the scale runs up through black, so red says busy rather than broken. Both the dot and the status line carry the figure itself beside the colour. The scale reaches 600 % as long as the columns fit under it. A connection which runs many calls at the same time goes far beyond that; several thousand per cent is normal while data is read over several threads. The scale then grows in whole steps of 500 % until the highest column fits, and marks each of those steps with a line and a figure, because above 500 % no colour boundary is left to mark. It drops back once that column has passed out of the period shown. "Minutes Shown" sets how far back the graph reaches, from 1 to 60 minutes, 5 by default. The list below it always covers the last hour, whatever the graph shows. A column stands for one second until the period has more seconds in it than the graph has pixels, after which one column covers several. Dragging across the graph picks a period and leaves only the calls which were running then; a click without a drag clears the selection. Changing "Minutes Shown" clears it as well, since the same place in the graph then stands for another moment. ## The List The list holds the calls of the last hour, newest first: - "Started (UTC)": the moment the call began, in UTC. - "Duration (ms)": how long it took, in whole milliseconds. - "R/W": R for a call which read and W for one which wrote, the same in every language; grouped by request, RW for a request which did both. - "Rows": the number of rows the call yielded. - "Round Trips": how many exchanges with the platform the call took. - "Bytes Sent" and "Bytes Received": the traffic the call caused. - "From Cache": ticked where the answer came from a cache instead of from the platform. - "Data Container": the driver the call went through, such as `Dummy` or `SqlServer`. - "Partition": the partition addressed, for a platform which has them. - "Message Code": the code of the failure, where the call failed. - "GUI Action": what the user was doing when the call was made, such as the document the statement was executed from. - "Request": what was addressed - the statement for a database, the web address for a platform. It is the same field either way. An operation which names itself rather than what it addressed - `Fetch`, `Create table`, `Drop table` - is shown with the object behind it, so a row reads `Drop table PJT` instead of `Drop table`. A call which is still running is shown dimmed, with the time elapsed so far as its duration. A read from a database such as Oracle, Microsoft SQL Server or PostgreSQL which hands on its rows while they arrive also shows the rows and bytes so far, several times per second, so a long read can be followed while it runs. A bulk insert into one of these databases shows the rows and bytes sent so far after every batch of rows it has sent. Other calls leave rows and bytes empty until they have ended. For a database, "Bytes Received" is an estimate of the size of the rows read rather than the traffic on the wire. The status line under the list states how many calls are held, the moment of the oldest, and the share of the last seconds spent waiting. ## Filtering Three filters narrow the list, and they combine: - "Containing" leaves only the activity whose statement, address, data container, partition or asking part of the application holds the text. - "Only with Error" leaves only the calls which failed. - "Exclude Cached" leaves out the calls answered from a cache, which is how the traffic actually sent to a platform is read. A period picked in the graph narrows the list in the same way. ## Grouping by Request "Group by Request" shows one row per request instead of one per call, with the number of calls, the failures among them, the time waited and the rows added up over everything listed. It is how a statement which costs hundreds of calls is read as one line: ![[20260904-qt-connection-monitor-grouped.png]] Double-clicking a group shows the individual calls again. ## What One Call Records The list shows the columns worth a place in a table; what is recorded about a call is far more. The context menu on a row offers: - "Details...": everything recorded about that one call on one page, read off the record itself, so a figure added to the record appears here without the window being changed. Whole numbers are written with the group separator of the language, and a name reads from the top of its row where the value beside it wraps over several lines; - "UniversalSQL Statement...": the statement the call belongs to. A statement which has left the cache of query plans cannot be shown, and what the call addressed is shown instead; - "Show Progress": the picture the [[Invantive Query Tool/Progress|Progress]] panel drew of that statement. It is no longer held once the document which drew it has been closed; - "Copy Cell": the value of the cell under the pointer, on the clipboard. ## Refreshing and Exporting "Auto Refresh" keeps the window up to date twice a second and is on by default; switching it off freezes what is shown, which is what reading a long list needs. "Export..." writes the list as it is filtered to a comma-separated file. ## Where It Is Available The Connection Monitor is part of Invantive Producer and is reachable from the products built on it: Invantive Query Tool, Invantive Data Loader and the runtime of [[Invantive Business/Invantive Business|Invantive Business]]. Each application shows its own calls; a second application on the same workstation has a monitor of its own.