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

What is fixed_string mean in vid_type? #571

Closed
aminmaghsodi opened this issue Jul 27, 2021 · 2 comments
Closed

What is fixed_string mean in vid_type? #571

aminmaghsodi opened this issue Jul 27, 2021 · 2 comments

Comments

@aminmaghsodi
Copy link
Contributor

Hi, In documentation of CRUD section, there is a notation that we should define vid_type, which could be FIXED_STRING(N). My question is about N parameter. What happens, when we define for example N = 10 then we put a key with length N = 2? Are those extra 8 bytes allocated and we have waste of disk usage or they will be ignored and just (2 * size of string) is allocated?

@foesa-yang
Copy link
Contributor

foesa-yang commented Jul 27, 2021

Define N=10, if the length is less than 10, it will automatically fill in'\0'. Allocate space for '\0', but do not count the length of the string. Same as char(N) in SQL

@aminmaghsodi
Copy link
Contributor Author

Tahnks @foesa-yang for your time and good answer :)

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

No branches or pull requests

2 participants