J
J
JoveLebedev2017-02-10 15:35:44
MySQL
JoveLebedev, 2017-02-10 15:35:44

What resources are needed to increase the speed of working with a large sql table?

There is a table.
When the number of records is 1.000.000, the request
select count(id) from smi_objects;
is executed in 1 second.
After some time, when the table has become 1.300.000 records in size, the identical query is 20 seconds.
What basic hardware resources does sql use in such selections?
Because the amount by which the table has increased is not proportional to the increase in the query execution time, I suspect that the matter is in the RAM, but I'm not sure.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav Makarov, 2017-02-10
@JoveLebedev

With a million records, 1 second to count the number??
Do you even have indexes on this table and the id column?
What hardware resources can we talk about, learn how to use a DBMS.

S
Smithson, 2017-02-10
@Smithson

RAM, RAM and more RAM.
As a cheaper palliative, you can try moving the database to faster drives (NAS or SSD).
But if the DB can be cached into memory, then you won't have problems with reading speed :)
That's what, for example, SAP HANA stands for - as long as the database is placed in RAM, even SAP works tolerably. As the base stops being placed in RAM - well, SAP, it is SAP :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question