Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compression suggestion #1911

Closed
filonenko-mikhail opened this issue Sep 16, 2022 · 0 comments · Fixed by #1935
Closed

Compression suggestion #1911

filonenko-mikhail opened this issue Sep 16, 2022 · 0 comments · Fixed by #1935
Assignees

Comments

@filonenko-mikhail
Copy link
Contributor

filonenko-mikhail commented Sep 16, 2022

Motivation

There is compression feature in Tarantool EE version. Such feature works per fields. The motivation is to show this possibility for User.

(OBSOLETE, see notion https://www.notion.so/dd15fd804ef94d69b91205b35d5ec57a ) Propolsal

  • Make a separated lua module

  • Make a lua function which mayBeCompressed(space name, field name) -> float

  • Select random 10000 tuples from space

    • Make iteration with yields every 1000
  • Make a temporary space with the same format as space name

    • Make field name is_compressed = true
  • Insert random 10000 tuples into temporary space

  • Compare original space bsize and temporary space bsize

  • Return compression ratio

  • Make a iteration over spaces

  • Choose only string fields

  • Filter fields, choose only fields which is not in indexes

  • Make a list with result [{name: aaa field:}, {}]

Corner cases

Handle cases:

  • Skip empty spaces (space:len == 0)
  • Skip system spaces ( id < 512 or name starts with _ (underscore)
  • When iterate check that space exists. It can be dropped.
  • The only function can be called only once at same time.
  • It is possible that tuple has more fields than space:format
  • It is possible that tuple has less fields than space:format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants