How to store a huge amount of data in php?

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?

+3
source share
4 answers

Do not do this.

Databases are designed specifically for processing large amounts of data. No arrays.

, , . PHP . , , db , PHP.

, SQL-.

+19

. , , , ( ) SQL.

( - db ), select where (s).

+4

PHP , PHP , , PHP-. ( ), , . , , , PHP.

+2

:

  • 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.

+1
source

All Articles