[MDEV-21955] Packed sort keys: Evaluate performance of dynamic-length mem-comparable data encoding Created: 2020-03-16  Updated: 2020-08-17  Resolved: 2020-08-17

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Sergei Petrunia Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-21784 Performance testing for packed sort keys Closed

 Description   

Based on the experiments in MDEV-21784, it is interesting to see what would be the performance of dynamic-length mem-comparable key encoding. MyRocks already uses such encoding so it should be fairly easy to try.



 Comments   
Comment by Sergei Petrunia [ 2020-03-16 ]

A branch with a crude patch implementing this:
https://github.com/MariaDB/server/tree/10.5-mdev21955

Benchmark results:
https://docs.google.com/spreadsheets/d/1Y7FDgbmhXFigrgLd9pbZnNqbj5PCaxu9a1ahUU_QFRQ/edit?usp=sharing

Comment by Sergei Petrunia [ 2020-03-17 ]

Summary of benchmark results so far:

Using Packed Keys with Variable-Length Mem-comparable Encoding produces a 10..30% speedup over current implementation of packed keys.

Looks like this is worth considering implementing for 10.6...

(Note that this encoding could also be used with priority queue. If one is sorting VARCHAR(255) there should be a gain from sort keys being smaller).

Comment by Sergei Petrunia [ 2020-03-18 ]

Relative popularities of charsets according to the feedback plugin: https://gist.github.com/cvicentiu/143ad0750c59b523a47a1aebe0706068

Generated at Thu Feb 08 09:11:06 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.