I have troubles with performance when I get 20k-50k and more rows from SELECT * FROM table
in rows.scan(&a, &b...)
. I don't know how to use concurrency in this case because I need to use rows.Next()
for iterating, and I can't do it in concurrency.
Performance drops only when I scan results from rows to structure's fields in rows.Scan
.
The query takes 5-15 ms, but scanning takes (40k rows) 800-2000ms.
Thank you!