Closed b-tarczynski closed 2 years ago
Hey @timshannon, I would go further and label this issue as a bug. Iterating over all index keys (PrefetchValues
enabled), instead of doing a simple index query in this case, seems to kill performance benefits of the index.
When using index query with operator
eq
orin
it would be better to use simplebadger.Get
to get value of that index rather than using iterator which iterate over every index and decode value ofKeyList
.In above test
badgerhold.Store
iterates over all records and callsDecode
function 10k times. It should be justbadger.Get
call forbadgerhold.KeyList
and one get for each value in that struct.