In addition to indexing, which has already been proposed, you can also look at the partition tables, if they are large.
Partitioning in MySQL
It is difficult to be specific here, because we have very limited information, but the correct indexing along with the separation can take a very long time. Correct indexing can be a long topic, but in a very general sense, you need to index the columns you are querying for.
For example, let's say you have a table of employees, and you have regular columns SSN, FNAME, LNAME. In addition to these columns, we will say that you have 10 more columns in the table.
:
SELECT FNAME, LNAME FROM EMPLOYEES WHERE SSN = 'blah';
, SSN, , , , , , , , (SSN, FNAME, LNAME). , , , , , , . (.. -). , SSN , (-), (-), , (: -), fname lname.
, , , - .
: