databend icon indicating copy to clipboard operation
databend copied to clipboard

Feature: allow user to query on spilled storage size on system.query_log table

Open ZhiHanZ opened this issue 2 years ago • 4 comments

Summary

Description for this feature. Consider to add two fields bytes_spilled_to_local_storage and bytes_spilled_to_remote_storage to system.query_log table allow user to checkout the number of bytes spilled to local storage and remote storage could help them troubleshooting their query performance issue when query consume too much time.

Ref: https://docs.snowflake.com/en/user-guide/performance-query-warehouse-memory

ZhiHanZ avatar Apr 18 '24 14:04 ZhiHanZ

Are the fields bytes_spilled_to_local_storage and bytes_spilled_to_remote_storage the same as bytes_from_local_disk and bytes_from_remote_disk? If so, why add these two redundant fields?

dracoooooo avatar May 07 '24 13:05 dracoooooo

Are the fields bytes_spilled_to_local_storage and bytes_spilled_to_remote_storage the same as bytes_from_local_disk and bytes_from_remote_disk? If so, why add these two redundant fields?

After a spill, the read may not occur or it could take place on a different query node. Therefore, we need to determine the number of spilled bytes.

bohutang avatar May 07 '24 13:05 bohutang

And it is primarily serve for estimating proper warehouse size for curtain query category, if customer found that the spilled bytes is pretty high, they could consider to upgrade warehouse to save query time.

ZhiHanZ avatar May 08 '24 07:05 ZhiHanZ

We don't support bytes_spilled_to_local_storage now.

sundy-li avatar May 08 '24 09:05 sundy-li