Answer the question
In order to leave comments, you need to log in
Is it worth it to do so?
Now I want to try something new (get away from standard databases like muscle and postgres). I made a service in which I hardcoded data structures (like tables), and a similar system acts as an index
//структура юзеров
type User struct{
login string
email string
}
//первичный индекс int == id. Он используется в индексах других таблиц
var UserId map[int]User
//индекс на логин где string индекс, а int хранит ключ для массива UserId
var UserIndexLogin map[string]int
Answer the question
In order to leave comments, you need to log in
1. if noSql is needed, then mongodb with fsync configured.
2. Calculate manually, no one knows how many characters you will allocate for the login or how many such profiles there will be in total. Well, or if "that's right now", then https://golang.org/pkg/net/http/pprof/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question