Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93104 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85775 invoked from network); 7 May 2016 00:16:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 May 2016 00:16:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.174 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.220.174 mail-qk0-f174.google.com Received: from [209.85.220.174] ([209.85.220.174:34007] helo=mail-qk0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/32-53854-2D33D275 for ; Fri, 06 May 2016 20:16:18 -0400 Received: by mail-qk0-f174.google.com with SMTP id r184so69279777qkc.1 for ; Fri, 06 May 2016 17:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=MeQbxREMglXekK8xGIH8MXI6DjVRuVWdvrGRAfDMo6A=; b=QSZF8LRyDVNVr8sW3IYuKy0xdc7SKwHEMnrnO2Pl8f9d4sPwUhuW7ugxryFZFDxjCX vr0lDomf/YegsiR7xemsNAy7cftyt7ik/3WIE+NjOTS5WPjLUFaDoeJIaQdumyw7p0rF BnBVMHxLe65FJBy/vGanxXG+/7kwJT8Gw4aK2c5Az54fGQzHHKWg0ZYSqNpWFwk7zAm5 GA24J11kCd7yFbfqFlSHq+Urnauy9yeDaODU2Lhx3uXpcJ7NutG08c1UraGlgPbvuYZZ CDkRUrXwZlwAhB8yyZmKYp15IDjKvJo9cEqa8g5jRvRnqFuXim80axqCCccggzC37xfk 57Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=MeQbxREMglXekK8xGIH8MXI6DjVRuVWdvrGRAfDMo6A=; b=I7NPdvo8mL4VetPu3KkrrEtQtFseW5ezF8IDraPHNbWWoNG6X9dYR/VVci0TMalmKV gJ2ojdWpsblgr6uIIdRgZCYMCoVmiyZ2lHaXVq7H7/7th27g/10DGxrttQU1DlbWl7EH VYwqVt4Fp2UbTC6rHySazxcfdSECcDnBm6ull5Qfgvhh6U5/JnwO3W7/s7mYq2ewvTKM RGLkaw/M7Q/L0TRnlUFxhptxCRGcR8yMhH0/vP9KN+kvKS3r5uXsWqqDv+dELmi7p1+P QXwmY3eFgCwjeELVMnbesurXnN11NRWsiPLAfctX0H1SY/yKHDCm6KusNIIdEP1qMnEN GbbA== X-Gm-Message-State: AOPr4FVom8UU9M36SI6XTpk052+J8W5cqogBlcVvaBRA6xO41XX3BOCzJzahSmbrhlrR7oxttb/CtteBz7JhLw== X-Received: by 10.55.185.67 with SMTP id j64mr23545792qkf.205.1462580175929; Fri, 06 May 2016 17:16:15 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.140.27.133 with HTTP; Fri, 6 May 2016 17:15:36 -0700 (PDT) In-Reply-To: References: Date: Sat, 7 May 2016 09:15:36 +0900 X-Google-Sender-Auth: nJQJC2lY4UJWY_CwAGayieiycf0 Message-ID: To: Stanislav Malyshev Cc: Raja Kulasekaran , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] How to get trace of all database queries executed by php From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi, On Sat, May 7, 2016 at 9:06 AM, Stanislav Malyshev wrote: > >> Is there any php extension available which help me out to give the >> statistics of >> all the queries execution details ? > > I'm not sure there is an extension doing specifically that, but any > profiler or debugger extension would be able to capture database calls, > and thus have access to this data. They usually would not dump this > information though, so one would need to modify them to do it. Also, you > may have better luck just enabling query logging in your database, most > databases allow to do that. I would like to write one from years ago. It is not started yet, though. We need such extension because database level logging is useless without account information. If anyone need it now, you may use RunKit for this purpose. http://php.net/manual/en/book.runkit.php Replace query execution function/method with your version and log whatever you need. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net