Re: 答复: response time is very longin PG9.5.5 using psql or jdbc - Mailing list pgsql-bugs

From Andres Freund
Subject Re: 答复: response time is very longin PG9.5.5 using psql or jdbc
Date
Msg-id 20180213190556.u62ypanleiw2oufw@alap3.anarazel.de
Whole thread Raw
In response to Re: 答复: response time is very long in PG9.5.5 using psql or jdbc  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
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
mayneed 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


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: 答复: response time is very long in PG9.5.5 using psql or jdbc
Next
From: PG Bug reporting form
Date:
Subject: BUG #15063: Updates to temporary tables fail when there is apublication with FOR ALL TABLES