How can I speed up the process of retrieving information about downloaded files? At the moment, information about the downloaded files is in MySQL.
Here is what it looks like now:
$stmt = $this->mysqli->stmt_init(); $stmt->prepare("SELECT id FROM daemon_zip WHERE dir_city = ?;"); $stmt->bind_param("s", $dir_city); $stmt->execute(); $res = $stmt->get_result(); $res = $res->fetch_assoc(); if ($res == null) { // ... } It is necessary to optimize the process of retrieving information about the downloaded files and checking whether the file is downloaded or not, at the moment it’s checking whether the file is downloaded or not takes a lot of time, from 0.1s
PS: At the moment there are about 140 thousand 8 million records in the database.