Re: Fwd: Query with high planning time compared to execution time - Mailing list pgsql-performance

From Richard Lee
Subject Re: Fwd: Query with high planning time compared to execution time
Date
Msg-id CALhvPTS5ao9U33xo91UYPzQx2EXZex1Mbd3P9iX-GeVbd5VBPg@mail.gmail.com
Whole thread Raw
In response to Re: Fwd: Query with high planning time compared to execution time  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: Fwd: Query with high planning time compared to execution time
List pgsql-performance
Hi,

I managed to install postgresql10-debuginfo:
[root@kvrh7os202 /]# yum install -y postgresql10-debuginfo.x86_64

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 ... >
 Planning time: 1817.355 ms
 Execution time: 31.849 ms
(480 rows)

[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.025 MB perf.data (136 samples) ]
-bash-4.2$
-bash-4.2$ perf report -g > perf_report_20181105_1452.out

Please refer to the attached for the perf report output (not sure if it was done correctly).

Regards,
Richard Lee

On Mon, Nov 5, 2018 at 12:10 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
On Mon, Nov 05, 2018 at 11:36:46AM +0800, Richard Lee wrote:
> Hi,
>
> Debug symbols can only be enabled during configure? How about when
> Postgresql is running?

If you're running from RPMs (maybe from yum.postgresql.org), you can install
postgresql10-debuginfo (maybe using: "debuginfo-install postgresql10").

Just be sure it installs the debuginfo for exactly the same RPM (rather than
installing a new minor version, for example).

If you compiled it yourself, you can probably point GDB to the un-stripped
binaries.  Again, assuming you have binaries from exactly the same source
version, no additional patches, etc.

Justin
Attachment

pgsql-performance by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Fwd: Query with high planning time compared to execution time
Next
From: Justin Pryzby
Date:
Subject: Re: Fwd: Query with high planning time compared to execution time