Re: Fwd: Query with high planning time compared to execution time

2018-11-06 Thread Richard Lee
Hi, Ah, apologize for the mistake. The entire will take several hours to complete and the problem query won't be executed until about halfway through the benchmark. Should I do `perf record` when the query appears? Or one `perf record` at the start of the test and another one when the query

Re: Fwd: Query with high planning time compared to execution time

2018-11-05 Thread Justin Pryzby
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

Re: Fwd: Query with high planning time compared to execution time

2018-11-04 Thread Justin Pryzby
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

Re: Fwd: Query with high planning time compared to execution time

2018-11-04 Thread Richard Lee
Hi, Debug symbols can only be enabled during configure? How about when Postgresql is running? Regards, Richard Lee On Fri, Nov 2, 2018 at 9:55 PM Tomas Vondra wrote: > On 11/02/2018 10:36 AM, Richard Lee wrote: > > Hi, > > > > I'm running a performance test for our application and encountered

Re: Fwd: Query with high planning time compared to execution time

2018-11-02 Thread legrand legrand
Tomas Vondra-4 wrote > On 11/02/2018 10:36 AM, Richard Lee wrote: > [...] > >> What are my other options to improve the query planning time? >> > > Can you do a bit of profiling, to determine which part of the query > planning process is slow here? > [...] After planning profiling, (or in