Answer the question
In order to leave comments, you need to log in
MySql index vs Javascript V8 object?
I do caching in Node.js code, that is, I save data from the MySql database into javascript objects for a while until nothing changes. There was usually not much data - dozens of lines. But now there was a task to do the same with a million lines.
The question arose whether such caching would worsen the speed of work if you select by key in the javascript object instead of a similar query in the database?
SELECT * FROM map WHERE location = '12345'; (field location under btree index, table type MyISAM, table has a million records)
vs
var record = map['12345']; (V8 under Node.js, object has a million values)
Is there a difference between fetching one element and a couple of thousand elements?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question