Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gRkjd-0005pS-5A for pgsql-general@arkaria.postgresql.org; Tue, 27 Nov 2018 21:17:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gRkjb-0004BD-C6 for pgsql-general@arkaria.postgresql.org; Tue, 27 Nov 2018 21:17:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gRkja-0004B6-V3 for pgsql-general@lists.postgresql.org; Tue, 27 Nov 2018 21:17:31 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gRkjY-0001Jr-00 for pgsql-general@lists.postgresql.org; Tue, 27 Nov 2018 21:17:30 +0000 Received: by mail-qt1-x843.google.com with SMTP id i7so23504693qtj.10 for ; Tue, 27 Nov 2018 13:17:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=5XRPQORs7VWYwkrSM0f3/X49xfRns+GyvciAheiKRbM=; b=GWojgF29g9wGsVfQDQUYDwVq9yVayWhxGkZYghO/XlE07HdlczZp0Lw5q1GQB8EefP QEh7nBONeXLo3oailzOQ5qQXOc9Xt1OYUKQUNhGuw9j1bLgZ4OYtof4fC+kifb4hH7zN tCbR4P91kzTUIg8lfNRxzakCz2pSK5kH8NmpbIc0O61EMRgYu3ciHFfMCjgi64/sShu/ FRElPmsiBa98/7SUmW30HhGY7euD6Gg6MPBsgmZ/B6oDxvPLZPohAl/8j9j50/gmc1RB O38LcaojDpZwdeS15YeuKfWpY0E5giOU74PPsS2LwNoMMYRNPOvs7KH7wTcdZcWjTjRm hCQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=5XRPQORs7VWYwkrSM0f3/X49xfRns+GyvciAheiKRbM=; b=YxoVDJXd/NlsZvFOURBT7C8dhYFiS+I87r+NPttw7SC6HgoobC8zA4YkIiyuSRB2gI FJaC9Q7Ax7bSRNUWRpPxhtB8w3360L/CzPbp8x4qheZqwMC153ukHUnPevSUEUN/Rz6p 58VTdIoH/pRSo8o9cWEoz5ITNR+RqfMUy3o2xZwcDtWmqdpT8e5chmODPNuZqAxCuWZM pUAEtWBW9e1bvBvKQCd1ohFZNPEDRMs6+Cdzcc5h3gcF2ieDG7SxerdehA914VhBYONX CJxKuStSLQfIxWxapbK54Zt56PRJCX0RplyIgzUI3uANcTBIFa4gQiYK/Eo2xbqD6WIv wJyQ== X-Gm-Message-State: AGRZ1gIk3ca9VsKXUvxISVS9S92/HzBDljVKVAr4LZcbQwd5qe4ggc28 SWhVCMHa4uNd737P3RboQJj5ITJ8ZaI= X-Google-Smtp-Source: AFSGD/UYs48iI+BMYFFFy7akV//rJfVaBSOHedFGy+0JQ9HZpL9qPP3Fcye3+ayrflcMtdTe7h353w== X-Received: by 2002:ac8:6659:: with SMTP id j25mr31397733qtp.371.1543353444669; Tue, 27 Nov 2018 13:17:24 -0800 (PST) Received: from alvin.alvh.no-ip.org ([200.73.2.58]) by smtp.gmail.com with ESMTPSA id 5sm2791011qtw.50.2018.11.27.13.17.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Nov 2018 13:17:24 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 5959BC6E; Tue, 27 Nov 2018 18:17:21 -0300 (-03) Date: Tue, 27 Nov 2018 18:17:21 -0300 From: Alvaro Herrera To: Sergei Agalakov Cc: pgsql-general@lists.postgresql.org Subject: Re: pg_stat_statements: can we extend the object names to the qualified names? Message-ID: <20181127211721.4keykfxn66mcipdo@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <372d75cc-053b-1a07-948f-089408d3cd3a@gmail.com> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Nov-27, Sergei Agalakov wrote: > We do see that the queries are different but we can't see why they are so > much different in the execution time. > If the pg_stat_statements module would extend the object name to the > qualified names like s1.t1 and s2.t2 then we would see the report as > 3004391594 select count(*) from s1.t1 > 1336375111 select count(*) from s2.t1 > with an immediate understanding of what's going on. I think this is hard to do in a really useful manner -- if we qualify all names in the query, it becomes mangled to the point that it's no longer easily recognizable (users want to "grep" their applications to see where the queries are). Maybe we can have a second column that shows the query with all object names schema-qualified, keeping the original one that uses the query as entered by the user. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services