Answer the question
In order to leave comments, you need to log in
How to speed up mysql?
Tell me how to be?
There is a table of 500 million lines.
I start sampling (I wait half a minute) I receive values.
At the same time, the percentages and the RAM do not strain (the selection takes place on the fields with indexes)
How to make Mysql use the full resources of the PC and can this affect the speed of the database? It's just that the processor load is at levels of 5% percent and that's it, and the RAM also does not twitch
Answer the question
In order to leave comments, you need to log in
Any questions about "accelerating mysql" must be accompanied not by unfounded statements "Fuck, use indexes, swear by mom!", But EXPLAIN OUTPUT
Without which the question basically does not make sense, and should be deleted.
Plus, it's nice to immediately roll out the result of SHOW ENGINE INNODB STATUS
You can use MySQLTuner to check what can be optimized in the MySQL configuration
It is not so important how many rows are in the table, how much their size is to talk about RAM.
500 million lines of 10 characters long can be only 5 GB, and completely fit into the RAM of almost any home computer. You can see the size of the database, correct the mysql settings.
But it would be more correct to analyze the query, it is possible to build the correct indexes by hand.
With such volumes, all sorts of denormalizations are often used so that there is no fullscan, you need to dig with indexes, sometimes you write queries differently, maybe you have a hundred JOINs in which the connection is not by keys, but by simple text fields or some other things, with 100k records it was imperceptible, but at 500m it became.
well, as people wrote above - profile ..
And by the way, if your select returns, for example, 100 million out of your 500, then you need to apply the limit, the network stack may already be the bottleneck there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question