I would like to be able to extract read-by-table statistics from the SQL statements executed by the system to generate a log of "suspicious" statements. In IBExpert, there is a feature that allows you to view, when executing an SQL statement, the amount of records read per table, separated by indexed and non-indexed readings, as well as the total number of records in the table, related to just that statement.
This allows us to identify problems that only the execution plan alone cannot demonstrate, as we have already had cases in which an instruction that brought us 100 records came to read in one of the tables involved, more than 100000 records because it was filtering in the wrong table. The plan did not help us in this case because all readings were indexed, we only discovered the problem when running this command in IBexpert that demonstrated this excessive reading.
I have researched from various sources without success how this is done.
I have already tried to use the firebird monitoring tables, but it only presents a "general" statistics, without this separation.
I have already tried to use the fbtracemgr application but there is no such possibility.
Does anyone have any idea how this is done?