Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkkNL-0003za-VZ for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Dec 2020 08:54:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kkkNK-00011x-Tt for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Dec 2020 08:54:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkkNK-00011q-NL for pgsql-hackers@lists.postgresql.org; Thu, 03 Dec 2020 08:54:06 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kkkNI-0004Nq-Ud for pgsql-hackers@postgresql.org; Thu, 03 Dec 2020 08:54:06 +0000 Received: by mail-pl1-x636.google.com with SMTP id v3so751204plz.13 for ; Thu, 03 Dec 2020 00:54:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=gP/Z7U3vWRQazxZCXEv6hXYQIO13MMzoeHnzYxSngHc=; b=ls7gRHkTuDQwPBWZtb8ckG35LBTvZ4ShKifp9Vmrl0ivZjWW36+d1Egdp8fjpR1bo7 8CdSMptg9PP475i92drhb+HGo7SwbW71Ef0vA8/TQWuAhMK3r9wOj4+TcwB0BMG/amYs kWh2r+qfstVKFP9cGRodoWLba6rK6ANmNe4QwR6pHdBL5+ER++wCm6AMAc7L+/U99W48 kitglRsNg7MfCyYfSbD6Erg6rq5Cvt7z/gd4cl4FvhD7D2j39n+Egn7zc/gyz6B3TRG/ qHs1GbtHdt7Ks2FOptxCqqHMPGWrbokMirAjWvBmwBSIVg3EmBj7FQBql3oKCUn8Ek+F lIqA== 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:references :mime-version:content-disposition:in-reply-to; bh=gP/Z7U3vWRQazxZCXEv6hXYQIO13MMzoeHnzYxSngHc=; b=rw4nVyxviOeSYt1aGoPSWE9SA7GSOr80sauGNkKLvZm+Ty/RVVdBUQyXBtbsLcylvc R5xQjL8JoGULJNEsh2Io65TFDlXbmwPdbYTOWPYn6RwuAquLjluSMSIq2o4VbHbVFB9L fDMXy88bZxvYbEk1RNkJlxONMFn//RL65Mx0Fmer4hIIyoOZiNiPJRp/J0UjpOPNjfAh ALFGMKyBY+InhPQOm86dUYep0a9m6te5RI1ZJL95UX48Mk4ZcyYfcs6l/cI2XPxweqCe yCFBmmPvfTpbTeHa3P/DOM7CLEkRSd5PPFAslzTa+Uddfl0NPulpDTq8TpIa73iIATRm gXig== X-Gm-Message-State: AOAM530MatqoyUD3MM8P9Ils2l5qGKGrzCoS8w0ZmoT2zIrhJz/Dmdtf uKI/7UdS3hfhahQ8OVpqru0= X-Google-Smtp-Source: ABdhPJySK8zAPFpmhLpa94poEnWzPHyqBqcUcLCGsGMVq2yQQTmY/4SUYm+qmdCZRPLcBjwO3cTPdg== X-Received: by 2002:a17:90a:9e5:: with SMTP id 92mr2180524pjo.176.1606985642693; Thu, 03 Dec 2020 00:54:02 -0800 (PST) Received: from nol (36-228-92-107.dynamic-ip.hinet.net. [36.228.92.107]) by smtp.gmail.com with ESMTPSA id l23sm555174pgm.22.2020.12.03.00.54.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2020 00:54:02 -0800 (PST) Date: Thu, 3 Dec 2020 16:53:59 +0800 From: Julien Rouhaud To: Sergei Kornilov Cc: legrand legrand , "pgsql-hackers@postgresql.org" Subject: Re: pg_stat_statements oddity with track = all Message-ID: <20201203085359.GC8050@nol> References: <20201202040516.GA43757@nol> <20201202063241.GA51769@nol> <20201203010051.GA8050@nol> <1606983372910-0.post@n3.nabble.com> <1110111606984390@mail.yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1110111606984390@mail.yandex.ru> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Dec 03, 2020 at 11:40:22AM +0300, Sergei Kornilov wrote: > Hello > > > To get an increase in the number of records that means that the same > > statement > > would appear at top level AND nested level. This seems a corner case with > > very low > > (neglectible) occurence rate. > > +1 > I think splitting fields into plans_toplevel / plans_nested will be less convenient. And more code with higher chance of copypaste errors As I mentioned in a previous message, I really have no idea if that would be a corner case or not. For instance with native partitioning, the odds to have many different query executed both at top level and as a nested statement may be quite higher.