PHP & MySQL High CPU on Query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a situation where a query run from PHP/Zend Framework on a MySQL
database seems to hit the CPU harder than the same query run via the
MySQL command line.

The query is a simple SELECT statement querying 2 tables, 12 columns
with a short WHERE clause that filters the results to less than 100
records.

ZF is using the PDO adapter.  I've seen the query cause mysqld to show a
spike up to 50+% cpu while the query is run from a PHP call, and the
same query from the client barely nudges the process to 1%.

Is there something I can do to gather more data on what's going on and
why this is happening?  I'd expect some overhead, but that much of a
difference seems wrong.

Thanks for your advice,

David Christensen

=========================================================

This electronic mail is solely for the use of the intended recipient, 
and may contain information that is privileged, 
confidential and exempt from disclosure under applicable law. 
If the reader of this message is not the intended recipient 
– whether as addressed or as should reasonably be surmised by the reader – 
you are hereby notified that any dissemination, distribution or copying of this electronic mail 
or any attachment is strictly prohibited. 
If you have received this communication in error, 
please do not print, copy, retransmit, disseminate or otherwise use the information 
contained herein or attached hereto and notify us immediately 
by replying to the electronic mail address listed above. 
After notifying us, please delete the copy you received. 
Thank you.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux