30.11.2021 14:58, Roman Simakov wrote:
isql after set stat returns some statistics of a query execution like Current memory = 10647136 Delta memory = 148432 Max memory = 10728544 Elapsed time = 162.476 sec Cpu = 0.000 sec Buffers = 1024 Reads = 332280 Writes = 0 Fetches = 70584692 Actually the server gets it from the function INF_database_info using dbb_stats. For SuperServer architecture it includes concurrent changes but for Classic it does not. At least it's inconsistent.
That's legacy we used to deal with.
Also note the statistics is shown after query execution and I guess a user expects it to be related to the query. I think it's more correct to use att_stats here. Even taking into account legacy clients. att_stats like dbb_stats for Classic mode.
Basically agreed. Although I foresee inconsistencies with disk IO counters. E.g. dbb_stats now includes writes performed by cache writer in SS and writes performed by AST in CS. They will not be accounted in att_stats.
Another option is to add att_stats as well and show them in isql if stat ON.
We cannot change meaning of the existing counters in ISC_database_info(). Adding attachment-level IO counters to the info is possible, but ISQL will need to check whether new INF items are available and fallback to the dbb counters if connected to older engines.
Dmitry Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel