pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: 石勇虎 <SHIYONGHU651@pingan.com.cn>
Cc: pgsql-bugs@postgresql.org
Subject: Re: 答复: response time is very long in PG9.5.5 using psql or jdbc
Date: Tue, 13 Feb 2018 11:05:56 -0800
Message-ID: <20180213190556.u62ypanleiw2oufw@alap3.anarazel.de> (raw)
In-Reply-To: <30157.1518548280@sss.pgh.pa.us>
References: <72aa8c39225549dd8c1d18f96df8b1e3@pingan.com.cn>
	<30153.1518488973@sss.pgh.pa.us>
	<a82e97e75d05417da514e2c82dd8fb51@pingan.com.cn>
	<30157.1518548280@sss.pgh.pa.us>

Hi,

On 2018-02-13 13:58:00 -0500, Tom Lane wrote:
> =?gb2312?B?yq/Twrui?= <SHIYONGHU651@pingan.com.cn> writes:
> > Yes,we have more than 500 thousand of objects,and the total size of the database is almost 10TB.Just as you said,we may need to reduce the objects number,or you have any better solution?

Might also be worth knowing where the time is spent. Any chance you
could use a profiler like perf to figure out exactly where the time is
going?

A simple thing wich might already give some hints is to show us parser &
planner stats:
SET log_parser_stats = true;
SET log_planner_stats = true;
SET client_min_messages = log;
\i t.sql

that should print things like
LOG:  00000: PARSER STATISTICS
DETAIL:  ! system usage stats:
!       0.000043 s user, 0.000001 s system, 0.000041 s elapsed
!       [3.086537 s user, 0.061010 s system total]
!       100592 kB max resident size
!       0/0 [183368/0] filesystem blocks in/out
!       0/0 [651/3696] page faults/reclaims, 0 [0] swaps
!       0 [0] signals rcvd, 0/0 [0/0] messages rcvd/sent
!       0/0 [818/10] voluntary/involuntary context switches
LOCATION:  ShowUsage, postgres.c:4545


Just out of paranoia, could you share the result of:
SHOW ignore_system_indexes;


> Hmph.  I tried creating 500000 tables in a test database, and couldn't
> detect any obvious performance problem in session startup.

Did you try 9.5 or master? We've had a few improvements... But I think
the majority are only going to matter when a lot of relations are
touched in the same relation...

Greetings,

Andres Freund




view thread (11+ messages)  latest in thread

Message-ID: <20180213190556.u62ypanleiw2oufw@alap3.anarazel.de>
Permalink:  ../20180213190556.u62ypanleiw2oufw@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20180213190556.u62ypanleiw2oufw@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, SHIYONGHU651@pingan.com.cn
  Subject: Re: 答复: response time is very long in PG9.5.5 using psql or jdbc
  In-Reply-To: <20180213190556.u62ypanleiw2oufw@alap3.anarazel.de>
  References: <72aa8c39225549dd8c1d18f96df8b1e3@pingan.com.cn> <30153.1518488973@sss.pgh.pa.us> <a82e97e75d05417da514e2c82dd8fb51@pingan.com.cn> <30157.1518548280@sss.pgh.pa.us> <20180213190556.u62ypanleiw2oufw@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox