I need to search huge data from db through php code. I do not want to give many db deletes. Therefore, I selected all the data from db for search and tried to save it in an array for further search in the array, not on db, but the problem is that the data exceeds the limit of the array. What to do?
Do not do this.
Databases are designed specifically for processing large amounts of data. No arrays.
, , . PHP . , , db , PHP.
, SQL-.
. , , , ( ) SQL.
( - db ), select where (s).
select
where
PHP , PHP , , PHP-. ( ), , . , , , PHP.
:
php, memory_limit
Seriously, you will be better off optimizing your database so that you can quickly pull out the data you need to work.
If you are actually having problems, run the query analyzer to find out which queries take too long. Correct them. Repeat this process.