v.22.7Improvement

Fix for Incorrect result_bytes Value in INSERT Queries of system.query_log

The metric result_bytes for INSERT queries in system.query_log shows number of bytes inserted. Previously value was incorrect and stored the same value as result_rows. #39225 (Ilya Yatsishin).
The result_bytes metric for INSERT queries in system.query_log now correctly shows the number of bytes inserted instead of duplicating the result_rows value.

Why it matters

This fix addresses the incorrect reporting of result_bytes for INSERT queries, ensuring accurate monitoring and analysis of the amount of data inserted. Users can now rely on system.query_log to provide precise metrics for data ingestion size, improving query auditing and performance tracking.

How to use it

Users do not need to enable anything explicitly. After updating to the fixed version, the result_bytes field in system.query_log will automatically reflect the correct number of bytes inserted by INSERT queries.