Jump to content


This topic is now archived and is closed to further replies.


Large retrieval from MySQL Database

Recommended Posts



I have a MySQL database table that will hold 2500 records to begin with and will grow to maybe 10,000 records in the next few years. My question is: is it possible for query arrays to hold that many records? Here\'s an example:


$check="SELECT * From Users";




In the above example, if there are 10,000 records in the Users table, then from my understanding $result will get VERY big. Are there limits on how large $result can get? Is there a better way to retrieve the records than this? I am planning on displaying 10-20 records per page, but I figure that I need to get them all first and store them in a session until needed. Is there a better way to do this?



Share this post

Link to post
Share on other sites

I tried with 20,000 records and I dint have any issue. I guess its is not advisable to query a table one the whole and its always advised to break them up. If you try to do


select * from table


and say you have 1,00,000 records I am sure the page would get stuck and you might get CGI timeout error.


So I would recommend you to break the data.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.