That seems strange, how about a full text version of the query with out the vars in it? I doubt that will shed any light but it might.
The worst case scenario, I owuld think, for a query like that would be
SELECT * FROM singletable LIMIT 0, 50
It seems like there is another answer somewhere.
The full query is
SELECT name, fullname, login, id, imageloc FROM profiles LIMIT 0, 50
There are about 30 fields per row, and the fields being queried contain the shortest values (login is fixed at 12 characters, id is fixed at 8, imageloc is fixed at 1)
This problem has been plaguing me for a while -- I have a flat-file database and I want to move it over to mySQL for speed reasons, and my host has already suspended my account once for using an excessive amount of the CPU.
Again, thanks for your help.
D.
open(PROF, '<profiles.txt');
for($i = 1; $i <= 50; $i += 1){$line=<PROF>;print $line;}
close(PROF); /claus
I have an older Perl script that I used to perform all of the operations on the flat-file, but it runs horribly slowly (the file is 14MB, with ~10k lines in it). The new script that I wrote deals only with the mySQL database, and doesn't interact with the flat-file any longer.
Sorry for the confusion,
D.
jatar_k or anyone else, do you have any suggestions on how one actually goes about benchmarking a script? I found a few discussions here, but they don't discuss how to isolate the components in a script:
If it's for a significant time, there's probably a real problem with your script.
If it's just for an instant, the script is probably fine. If it's causing you real headaches, you may need to configure um...something...to decrease how greedy the CGI with processor cycles.