The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help speeding up loading data
I am trying to load / grab / select around 200,000 records from a table via PHP at it is taking on average 8 seconds. I am relatively sure that it is the actually run / load time rather than just a slow connection between me and the server because I was outputting the microtime before and after the loading.
I was also running it at the slowest time for my server (slowest meaning not being hit very often). I have tried with and without indexes on the id field, and that made very little impact, so it made me think even more that it was a PHP issue (rather than a database one). Also, I rebooted the server during testing to see if that would help (hey, it works on Windows machines, so why not try)... I really need to get this down, but can't figure out how to optimize it any more than I already have. Server Details: PHP 4.2.2 MySQL 3.23.54 Table Details: spell_langid = smallint (index) hash = int flags = int Total rows size = 17 bytes # rows = 268,449 # rows wanted = ~200,000 PHP: PHP Code:
Thanks! Nikki |
#2
|
|||
|
|||
Don't load so many, that's the only solution. Not only may the query take forever but it will use a huge amount of memory to cache all the data into variables.
|
#3
|
|||
|
|||
That is what I was afraid of hearing... Oh well, that is what I was thinking, but was hoping that someone might have some other insight for me... Poopy...
Okie dokie, I will be working on an alternate way... Thanks for the quick response and help! TTYL, Nikki |
#4
|
||||
|
||||
The best solution in these situations is to post here what you are trying to accomplish, not just the trouble you have bumped into with one chunk of PHP code.
Often there is a less-intensive solution for the whole task. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|