EchoFool Posted March 23, 2010 Share Posted March 23, 2010 Hey, Recently in my database i accidently inputted some hundread thousand rows. (have since deleted them) but now record id starts at like 100,000. I wasn't bothered by it so i just left it as its not important, how ever, i now notice PHP is slower at loading content when i while loop data from the table, what is the reason for this :S Is it due to the id being a high number ? Link to comment https://forums.phpfreaks.com/topic/196270-php-slow-on-large-numbers/ Share on other sites More sharing options...
jamiet757 Posted March 23, 2010 Share Posted March 23, 2010 I doubt it, the id is just data in the database row, you could have "chickenturds" as the id and it wouldn't matter to the database, just as long as your script looks for "chickenturds" in the database. There must be another underlying problem. Did you optimize the database? Link to comment https://forums.phpfreaks.com/topic/196270-php-slow-on-large-numbers/#findComment-1030703 Share on other sites More sharing options...
EchoFool Posted March 23, 2010 Author Share Posted March 23, 2010 Argh yes optimize seems to fix the problem What did optimize do to prevent the lag :S Link to comment https://forums.phpfreaks.com/topic/196270-php-slow-on-large-numbers/#findComment-1030705 Share on other sites More sharing options...
jamiet757 Posted March 23, 2010 Share Posted March 23, 2010 idk, I just know that optimize works. Look for a script that you can run as a cron job to automatically optimize tables once or twice a day, I do that and it helps keep my sites fast. It really seems like something that should happen automatically. Link to comment https://forums.phpfreaks.com/topic/196270-php-slow-on-large-numbers/#findComment-1030706 Share on other sites More sharing options...
EchoFool Posted March 23, 2010 Author Share Posted March 23, 2010 Good thinking ! Link to comment https://forums.phpfreaks.com/topic/196270-php-slow-on-large-numbers/#findComment-1030710 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.