You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Performance in CopyToString should be comparable to that of CopyToList and CopyToHash.
Current Behavior
CopyToString is over 100% slower than the aforementioned two.
Possible Solution
Because of Redis' data structures, CopyToString (strings) has to write one key per field, compared to CopyToList and CopyToHash that both write one key per row. This is not necessarily something that can be "quick fixed", but with other performance optimizations, especially transactions and pipelining, performance should improve drastically.
Steps to Reproduce
Run test cases with ~10k rows or so and your preferred DB.
View output:
➜ redisql git:(master) go test -v -db mysql -rows 10000
Preparing Test...
=== RUN TestCopyToString
--- PASS: TestCopyToString (8.43s)
=== RUN TestCopyToList
--- PASS: TestCopyToList (0.75s)
=== RUN TestCopyToHash
--- PASS: TestCopyToHash (0.92s)
PASS
ok github.com/DGKSK8LIFE/redisql 17.995s
The text was updated successfully, but these errors were encountered:
I'm working on one possible solution, but the bug is not definitively resolved. Definitely want to see your solution so go ahead and work on this, ty. @Fajrinmk
Expected Behavior
Performance in
CopyToString
should be comparable to that ofCopyToList
andCopyToHash
.Current Behavior
CopyToString
is over 100% slower than the aforementioned two.Possible Solution
Because of Redis' data structures,
CopyToString
(strings) has to write one key per field, compared toCopyToList
andCopyToHash
that both write one key per row. This is not necessarily something that can be "quick fixed", but with other performance optimizations, especially transactions and pipelining, performance should improve drastically.Steps to Reproduce
➜ redisql git:(master) go test -v -db mysql -rows 10000 Preparing Test... === RUN TestCopyToString --- PASS: TestCopyToString (8.43s) === RUN TestCopyToList --- PASS: TestCopyToList (0.75s) === RUN TestCopyToHash --- PASS: TestCopyToHash (0.92s) PASS ok github.com/DGKSK8LIFE/redisql 17.995s
The text was updated successfully, but these errors were encountered: