There's also the isc_dsql_sql_info() API call (see chapter 6 of the API
Guide). This gives statistics on a per SQL statement basis, and allows
you to get the number of inserts, updates, deletes, etc. performed by
the statement. Note that in the Firebird 3 API this is implemented as
the IStatement.getInfo API call.
On 01/08/2019 10:14, Vlad Khorsun wrote:
31.07.2019 15:06, Jiří Činčura wrote:
Hi *,
is it possible to get statistics about the executed query similar to
what isc_info_req_insert_count etc. allows? I'm mostly interested in
indexed/non-indexed read counts, but whetever is available I'll
include in the implementation.
These stats counters are available at the attachment level. See
isc_database_info() and tags below:
isc_info_read_seq_count,
isc_info_read_idx_count,
isc_info_insert_count,
isc_info_update_count,
isc_info_delete_count,
isc_info_backout_count,
isc_info_purge_count,
isc_info_expunge_count
Note, counters above are accumulated since attachment start, thus
one have to query
stats two times (before and after statement execution) and calculate
difference.
More details is available at API Guide, see "Database operation
counts" at chapter 4
"WORKING WITH DATABASES".
Hope it helps,
Vlad
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel