Hi Henry. I have a suggestion. Run in a seperate window "top d 1" with php running or mysql client and compare what happens. I presume that X-windows and similar mem/cpu hogs are disabled.
Do post your results please. This should be interesting. Regards, John Henry Hank <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hello - I'm posted this to the mysql list but got no response. While it sounds > like a mysql problem, I'm convinced that it is a PHP problem (see bottom of > note.) > > I've recently installed mySQL on a RH7.2 box without any problems - it runs > great. I've been testing some long running queries (full table scans, etc) > under different scenarios, and get wildy differing results. Between each test > case, I was flushing all tables and re-starting the mysql deamon. When I run > one of my longest queries in the mysql command line client, it runs in about 77 > seconds. > > When I run the identical query via a simple PHP script running on the box, the > same query takes about 930 seconds to complete. For the life of me, I can not > figure out why the identical query would run differently from the command line > than from PHP. I've repeated this test about 10 times just to be sure - and it > > is entirely repeatable: command line - about a minute - PHP - about 16 times > longer. Any ideas or suggestions? > > I'm running RH 7.2 (2.4.9-21) on a Dell Poweredge 2550, 1GB memory, RAID, with > mysql version 3.23.41 (the standard install unchanged from the RH media). Here > is the query...pretty simple: > > insert into summary_table > select frb, denom, series, > count(*) as cnt, > sum(bills) as bills, > sum(bills_hit) as bills_hit, > sum(total_hits) as total_hits > from detail_table > > If it a memory/cpu resource problem, how do I set RH to give PHP and Apache the > same priority as the mysql deamon? > > I've also written a small Perl script to execute the same queries, and that > runs in 70 seconds (same as mysql client), so there must be some > memory/processor limitation placed on PHP that prevents it from running as > quickly as these other methods. Any ideas/suggestions? > > Many thanks in advance.. > > -Hank > > __________________________________________________ > Do You Yahoo!? > Yahoo! Sports - live college hoops coverage > http://sports.yahoo.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php