Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47826 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58668 invoked from network); 7 Apr 2010 18:04:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Apr 2010 18:04:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=david@icewatermedia.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=david@icewatermedia.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain icewatermedia.com from 67.200.52.71 cause and error) X-PHP-List-Original-Sender: david@icewatermedia.com X-Host-Fingerprint: 67.200.52.71 mail2.omnisync.net Linux 2.6 Received: from [67.200.52.71] ([67.200.52.71:56455] helo=mail2.zypsmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 14/AC-20534-049CCBB4 for ; Wed, 07 Apr 2010 14:04:49 -0400 Received: from mail2.zypsmedia.com (localhost.localdomain [127.0.0.1]) by mail2.zypsmedia.com (8.13.8/8.13.8) with ESMTP id o37I3qrY032106 for ; Wed, 7 Apr 2010 13:03:52 -0500 Received: from DavidMurphyPC (rrcs-67-78-39-22.sw.biz.rr.com [67.78.39.22]) by mail2.zypsmedia.com (Scalix SMTP Relay 11.4.6.13676) via ESMTP; Wed, 07 Apr 2010 13:03:52 -0500 (CDT) Date: Wed, 7 Apr 2010 13:04:33 -0500 To: Message-ID: <000c01cad67c$c789b520$569d1f60$@com> x-scalix-Hops: 1 X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcrVxwPI2kadiERnSaKuJJ438KVJcQAtYeHA MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000D_01CAD652.DEB3AD20" Content-Language: en-us Subject: Mysql completing Query fast but mysql->query() takes long time to return even single selects/updates From: david@icewatermedia.com ("David Murphy") ------=_NextPart_000_000D_01CAD652.DEB3AD20 Content-Type: text/plain; charset="US-ASCII" As you can see PHP claims it took 20 seconds for mysql->query() to return but mysql think is took around 1.0s This is from our application I enabled profile in mysql to determine why an update took 20seconds. As you can see MySQL reported no where near that amount of duration took place. Is there any way I can dig into php and determine why mysql client libs are so slow (this is not using mysqlnd but mysql-client-libs on CentOS using 5.3.2) 04/06/2010 14:54:54 20.6899s UPDATE `calls` SET `Result`='Busy' WHERE `CallID`='144786' | Status | Duration | CPU_user | CPU_system | Context_voluntary | Context_involuntary | Block_ops_in | Block_ops_out | Messages_sent | Messages_received | Page_faults_major | Page_faults_minor | Swaps | ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ------------------------------------------------------------------ | starting | 0.000039 | 0.000000 | 0.000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | checking permissions | 0.000008 | 0.000000 | 0.000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | Opening tables | 0.000010 | 0.000000 | 0.000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | System lock | 0.000005 | 0.000000 | 0.000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | Table lock | 0.000006 | 0.000000 | 0.000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | init | 0.000036 | 0.000000 | 0.000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | Updating | 0.000099 | 0.001000 | 0.000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | end | 0.000023 | 0.000000 | 0.000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | query end | 0.000004 | 0.000000 | 0.000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | freeing items | 0.007410 | 0.000000 | 0.000000 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | logging slow query | 0.000004 | 0.000000 | 0.000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | cleaning up | 0.000004 | 0.000000 | 0.000000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Thanks David Murphy ------=_NextPart_000_000D_01CAD652.DEB3AD20--