Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJfLl-0005oc-2T for pgsql-performance@arkaria.postgresql.org; Mon, 05 Nov 2018 13:55:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gJfLi-0001vG-G0 for pgsql-performance@arkaria.postgresql.org; Mon, 05 Nov 2018 13:55:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJfLi-0001un-15 for pgsql-performance@lists.postgresql.org; Mon, 05 Nov 2018 13:55:26 +0000 Received: from mail-it1-x136.google.com ([2607:f8b0:4864:20::136]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gJfLe-0002XS-FP for pgsql-performance@lists.postgresql.org; Mon, 05 Nov 2018 13:55:24 +0000 Received: by mail-it1-x136.google.com with SMTP id h13so12725387itl.1 for ; Mon, 05 Nov 2018 05:55:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hRsbULCKicMFtCZSSI8+wk/ByZKycawlk6Dd3zNPBvI=; b=CMDEFmJpaDfAxGn81h2qQDnO2BCHzWe1xTQB1ER1Om5c62aLBNFtce/W8kKIf1iYYu Bth7G3zg7rKJAVZ//k7eakpbrNYxs0H3SpdW1fSMy+Cx6ZK7tMzzhxeUOKtyG7wrhP5F ru6rtKM98eQo5yUcUYZOvlLs2qHP/YcAeO9eYW+L3xcV1MFaIUopoO8ZsufR90G+t12K oSScciFOmHqC7/PQBG1CpJ9iK4ptJZ9tSmwkOq1XfHvlz/I8gkZFXiLnjqC6dg7sQA0Z ekNosWw0pCpHZHwhjNT55oNX6FjVFYcbuEJuWkZj8SUpK7WLrIF7T6/WFrVWKPJNXme+ Kbew== 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:user-agent; bh=hRsbULCKicMFtCZSSI8+wk/ByZKycawlk6Dd3zNPBvI=; b=YhkqN63OHAaENcR8IiXp7oWjV1ZlU4RHN+jXwR0YoLbOaSHHhjc6mkAr5V1NaOb+Ow upoajVC7dgMDGJLRpZE6e+CEGdAKCyNzBllH2iW/dRfL8K/dlnfchxOYeEU2e1ZbuPvK BmDQAl48qCJS+Mtxov8UurSI8oIqoL60YLjKJ5EfC6a5xwKxnDLP6kocv7a6YSwKytLr YRVmw0Po3t/sOQQiM7i3QysjF+d89SSpkqlMUECdO7p1ja7QbGDdFh5Uyi3WYWnaHnwG xFxNGjt4r0YnHsZ8ysQHCBO20kE2f2o6KR1XZ5QurP5wrV7nyk7bcNwqQIagAGWQrOtR yZ2g== X-Gm-Message-State: AGRZ1gL5ySnSHPuyFzvTyU30k89uqAsNUiU20CDi9+UJWMSpRlzBj29Z 6yt4i0gtXUxwtVBYjIFmogrdSA== X-Google-Smtp-Source: AJdET5fdv/LZxGrLYpNSD2Yjgj6Q4rfO3bC00S1uirWbWyOodr/+7JGjb7HXhOMapVv0jPKQ7fRTkQ== X-Received: by 2002:a05:660c:706:: with SMTP id l6mr7209662itk.21.1541426121365; Mon, 05 Nov 2018 05:55:21 -0800 (PST) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id c10-v6sm3434956itc.2.2018.11.05.05.55.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 05:55:20 -0800 (PST) Received: by pryzbyj (Postfix, from userid 1000) id A7625804FC9; Mon, 5 Nov 2018 07:55:19 -0600 (CST) Date: Mon, 5 Nov 2018 07:55:19 -0600 From: Justin Pryzby To: Richard Lee Cc: tomas.vondra@2ndquadrant.com, pgsql-performance@lists.postgresql.org Subject: Re: Fwd: Query with high planning time compared to execution time Message-ID: <20181105135519.GA25283@telsasoft.com> References: <8db7abc2-9ddf-858c-e3db-af014cf2ccd9@2ndquadrant.com> <20181105041009.GY25283@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Nov 05, 2018 at 03:04:29PM +0800, Richard Lee wrote: > Executed perf-record and perf-report: > -bash-4.2$ perf record -g -- psql -U sri sri < > /var/lib/pgsql/10/data/pg_log/1-b10/query.txt > < ... snipped ... > That's showing perf output for the psql client. What you want is output for the server process (essentially all the client does is move data between the user to the server). https://wiki.postgresql.org/wiki/Profiling_with_perf Justin