dredge Posted November 4, 2003 Share Posted November 4, 2003 Hello, 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"; $result=mysql_query($check); $row=mysql_fetch_array($result); 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? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/1292-large-retrieval-from-mysql-database/ Share on other sites More sharing options...
shivabharat Posted November 7, 2003 Share Posted November 7, 2003 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. Quote Link to comment https://forums.phpfreaks.com/topic/1292-large-retrieval-from-mysql-database/#findComment-4358 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.