Bug #109787 ha_innopart::clear_blob_heaps is hot even lob is not used with partition table
Submitted: 26 Jan 2023 7:55 Modified: 26 Jan 2023 14:17
Reporter: zhai weixiang (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[26 Jan 2023 7:55] zhai weixiang
Description:
when there's many partitions on the table, it iterates all partitions to check if lob heap isn't null and free them. If blob is not used, then it should do nothing. but the iteration itself costs too much cpu, especially when there's many partitions on table. In the benchmark, it costs 1.5%% cpu.

How to repeat:
same as bug#109786

Suggested fix:
We can add a flag to indicate if there's any blob heap used. if not, then skip the for-loop checking
[26 Jan 2023 7:57] zhai weixiang
a simple patch for testing

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: skip_lob_free.diff (application/octet-stream, text), 5.79 KiB.

[26 Jan 2023 14:17] MySQL Verification Team
Hello zhai,

Thank you for the report and contribution.

regards,
Umesh