in reply to Re^3: threads::shared seems to kill performance
in thread threads::shared seems to kill performance
I actually originally started by only loading data from the DB in smaller chunks - the way I'm using that DB allows me to split the whole table into about 5000 smaller ones. So instead of doing one SELECT and creating one huge hash (which always felt a bit wrong to me), I did 5000 smaller SELECTs and worked through those in sequence.
Performance of this however was terrible - roughly speaking about 20 seconds for loading that 1 big SELECT from DB vs 220 seconds for 5000 smaller SELECTs - all via one DB handle. And this was on SSD.
As for the in-memory DB, this is the first time I've heard about it and admittedly it looks very promising. Thanks for the hint - let me give that a try...
|
|---|