Answer the question
In order to leave comments, you need to log in
How to implement fast data update in mysql?
There is a database of disposable goods, for the test I loaded about a million units of goods there. And here UPDATE in this table lasts 3 seconds. The first SELECT after an UPDATE also lasts 3 seconds (then cached until the next UPDATE).
I rarely use SELECT, but I have to use UPDATE often, so the question is, how are databases optimized? I don't think that a million lines is a lot, but I'm sure that all this should obviously not work for 3 seconds. What data do you need to provide or do you have any general advice on compiling a database?
Answer the question
In order to leave comments, you need to log in
Databases are optimized by creating the right indexes and building queries that use those indexes.
You can delete the index before updating the data, then recreate it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question