Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93132 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15050 invoked from network); 9 May 2016 21:19:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 May 2016 21:19:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=patrick.allaert@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=patrickallaert@php.net; sender-id=unknown Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.50 as permitted sender) X-PHP-List-Original-Sender: patrick.allaert@gmail.com X-Host-Fingerprint: 74.125.82.50 mail-wm0-f50.google.com Received: from [74.125.82.50] ([74.125.82.50:37625] helo=mail-wm0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 55/50-11104-7DEF0375 for ; Mon, 09 May 2016 17:19:20 -0400 Received: by mail-wm0-f50.google.com with SMTP id a17so208839273wme.0 for ; Mon, 09 May 2016 14:19:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=C8gJIL39LeLnNu9AFaK8eO61rUBVKi9XiajPp6MHli0=; b=A66q0jh97cIQS1LKmi3DMtjei+mmtcWuU7xRp08e7b0cWgQCZUUFLcPmQAwg1VpGqE WhuvlyoIGd8RwdFJOAPB0z4ZF+DrrHoK5PwnBuzJBLW69r7C+S46UJY9KrLDkUq+C4Xi C9fkECv3VDX9K7IQCv5qe1ofAA8Ucts8vUHwF4csOlekejn+IaqRHZZsmwgs+d/unV4a TnwnoCe/PDSQcpN0gemwNFZoQdOkorccHte7Ke9pUgxb9bfD7xIcR2emOOVEzQ3B9Iic Of8JtJu4PqA7PajcoIaEhcrfkvWmnBN6/8FMwBcGQQMOCsMmHIa3kOxZ10HtVXZ+ERbB FEXQ== X-Gm-Message-State: AOPr4FWaBVWMgN6yhBfyoyEDRKu0Ao3yE6t+nvX2pm+o08M7X/QOft0yd3w1Y1N5sWtPy7KsXyWuLZzOGcFQ4Q== X-Received: by 10.28.0.78 with SMTP id 75mr12656137wma.20.1462828756988; Mon, 09 May 2016 14:19:16 -0700 (PDT) MIME-Version: 1.0 References: <34286ced-d10e-beb5-b0b6-4b86947c9da3@cu.be> In-Reply-To: <34286ced-d10e-beb5-b0b6-4b86947c9da3@cu.be> Date: Mon, 09 May 2016 21:19:07 +0000 Message-ID: To: Wim Godden , internals@lists.php.net Content-Type: multipart/alternative; boundary=001a113c88206d77fe05326f5cb2 Subject: Re: [PHP-DEV] How to get trace of all database queries executed by php From: patrickallaert@php.net (Patrick ALLAERT) --001a113c88206d77fe05326f5cb2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le sam. 7 mai 2016 =C3=A0 02:18, Wim Godden a =C3=A9crit= : > On 7/05/2016 1:34, Raja Kulasekaran wrote: > > I have encrypted php Application codebase which I may or may not have > > access. > > > > So, I would like to know how the application behaving / profiling > Database > > queries through the .so or .dll level . > > > > Is there any php extension available which help me out to give the > > statistics of > > all the queries execution details ? > > > > Most DB servers will allow you to do this directly or indirectly. > > If you're using MySQL, there's a few options : > - General query log (don't do this on a busy production server since it > will produce massive log files and the I/O alone could bring down your > server) : http://dev.mysql.com/doc/refman/5.7/en/query-log.html > - MySQLProxy : > http://philippeback.be/2013/02/logging-mysql-queries-with-mysqlproxy/ MySQL Proxy is indeed what I mostly used, I've shared a few LUA scripts to help logging/debugging/profiling them: https://github.com/patrickallaert/MySQL-Proxy-scripts-for-devs > > For Postgres : > > http://www.microhowto.info/howto/log_all_queries_to_a_postgresql_server.h= tml > > Kind regards, > > Wim > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --001a113c88206d77fe05326f5cb2--