pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feed答复: response time is very long in PG9.5.5 using psql or jdbc
2+ messages / 2 participants
[nested] [flat]
* 答复: response time is very long in PG9.5.5 using psql or jdbc
@ 2018-02-13 04:48 石勇虎 <SHIYONGHU651@pingan.com.cn>
2018-02-13 18:58 ` Re: 答复: response time is very long in PG9.5.5 using psql or jdbc Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: 石勇虎 @ 2018-02-13 04:48 UTC (permalink / raw)
To: ; +Cc: pgsql-bugs
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?
And I also have a question that if the backend's internal caches of catalog is shared with other users or sessions?if the pgbouncer is usefull?
[postgres:5521@eits] [02-13.11:42:25]=# select count(1) from pg_class;
count
--------
537384
(1 row)
-----邮件原件-----
发件人: Tom Lane [mailto:tgl@sss.pgh.pa.us]
发送时间: 2018年2月13日 10:30
收件人: 石勇虎 <SHIYONGHU651@pingan.com.cn>
抄送: pgsql-bugs@postgresql.org
主题: Re: response time is very long in PG9.5.5 using psql or jdbc
=?gb2312?B?yq/Twrui?= <SHIYONGHU651@pingan.com.cn> writes:
> In our product database,we met a problem .when we login in the
> database using psql or jdbc ,the response time is very long.
I'm going to guess that this has something to do with very slow population of the backend's internal caches during the first query of a session.
That suggests bloated system catalogs. Do you have an unusually large number of database objects (e.g., millions of tables or functions)?
Or is it possible that some transaction(s) transiently created a lot of objects, and vacuuming hasn't been able to shrink the catalogs back down?
regards, tom lane
********************************************************************************************************************************
The information in this email is confidential and may be legally privileged. If you have received this email in error or are not the intended recipient, please immediately notify the sender and delete this message from your computer. Any use, distribution, or copying of this email other than by the intended recipient is strictly prohibited. All messages sent to and from us may be monitored to ensure compliance with internal policies and to protect our business.
Emails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. Anyone who communicates with us by email is taken to accept these risks.
收发邮件者请注意:
本邮件含涉密信息,请保守秘密,若误收本邮件,请务必通知发送人并直接删去,不得使用、传播或复制本邮件。
进出邮件均受到本公司合规监控。邮件可能发生被截留、被修改、丢失、被破坏或包含计算机病毒等不安全情况。
********************************************************************************************************************************
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: 答复: response time is very long in PG9.5.5 using psql or jdbc
2018-02-13 04:48 答复: response time is very long in PG9.5.5 using psql or jdbc 石勇虎 <SHIYONGHU651@pingan.com.cn>
@ 2018-02-13 18:58 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2018-02-13 18:58 UTC (permalink / raw)
To: 石勇虎 <SHIYONGHU651@pingan.com.cn>; +Cc: pgsql-bugs
=?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?
Hmph. I tried creating 500000 tables in a test database, and couldn't
detect any obvious performance problem in session startup. So there's
something very odd about your results. You might try looking at the
sizes of the system catalogs, e.g like
select pg_size_pretty(pg_total_relation_size('pg_attribute'));
(In my test database, pg_class is about 80MB and pg_attribute about
800MB.)
> And I also have a question that if the backend's internal caches of catalog is shared with other users or sessions?if the pgbouncer is usefull?
pgbouncer or some other connection pooler would help, yes. But I don't
think the underlying performance ought to be this bad to begin with.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-02-13 18:58 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13 04:48 答复: response time is very long in PG9.5.5 using psql or jdbc 石勇虎 <SHIYONGHU651@pingan.com.cn>
2018-02-13 18:58 ` Tom Lane <tgl@sss.pgh.pa.us>
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