pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedDatabase connection for Tbl_B established
3+ messages / 2 participants
[nested] [flat]
* Database connection for Tbl_B established
@ 2007-05-30 21:45 Y Sidhu <ysidhu@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Y Sidhu @ 2007-05-30 21:45 UTC (permalink / raw)
To: pgsql-performance
I have a question regarding "connection for xxyy established" The situation
below shows records being added to 3 tables which are heavily populated. We
never "update" any table, only read from them. Or we delete a full-day worth
of records from them.
The question is: Is this method of repeatedly establishing and
re-establishing database connections with the same 3 tables efficient? As
in, is there a better way to add data?
Apr 25 03:38:47 saw alert_mgr[33696]: Database connection for Tbl_A
established
Apr 25 03:38:51 saw alert_mgr[33698]: Database connection for Tbl_B
established
Apr 25 03:38:54 saw alert_mgr[33700]: Database connection for Tbl_A
established
Apr 25 03:38:55 saw alert_mgr[25182]: user_new_locked: added 64 entries
(66880 total)
Apr 25 03:38:57 saw alert_mgr[33702]: Database connection for Tbl_B
established
Apr 25 03:38:59 saw alert_mgr[33704]: Database connection for Tbl_A
established
Apr 25 03:39:02 saw alert_mgr[33706]: Database connection for Tbl_B
established
Apr 25 03:39:04 saw alert_mgr[33708]: Database connection for Tbl_C
established
Apr 25 03:39:05 saw alert_mgr[33710]: Database connection for Tbl_A
established
Apr 25 03:39:06 saw alert_mgr[25182]: user_new_locked: added 64 entries
(66944 total)
Apr 25 03:39:06 saw alert_mgr[33712]: Database connection for Tbl_B
established
Apr 25 03:39:08 saw alert_mgr[33714]: Database connection for Tbl_A
established
Apr 25 03:39:11 saw alert_mgr[33716]: Database connection for Tbl_B
established
Apr 25 03:39:13 saw alert_mgr[33718]: Database connection for Tbl_A
established
Apr 25 03:39:15 saw alert_mgr[25182]: user_new_locked: added 64 entries
(67008 total)
Apr 25 03:39:18 saw alert_mgr[33720]: Database connection for Tbl_B
established
--
Yudhvir Singh Sidhu
408 375 3134 cell
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Database connection for Tbl_B established
@ 2007-05-30 22:32 Tom Lane <tgl@sss.pgh.pa.us>
parent: Y Sidhu <ysidhu@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2007-05-30 22:32 UTC (permalink / raw)
To: Y Sidhu <ysidhu@gmail.com>; +Cc: pgsql-performance
"Y Sidhu" <ysidhu@gmail.com> writes:
> The question is: Is this method of repeatedly establishing and
> re-establishing database connections with the same 3 tables efficient?
No. Launching a new backend process is a fairly expensive proposition;
if you're striving for performance you don't want to do it for just one
or two queries. Look into connection pooling ...
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Database connection for Tbl_B established
@ 2007-05-30 23:36 Y Sidhu <ysidhu@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Y Sidhu @ 2007-05-30 23:36 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-performance
You are referring to pgpool? BTW, thanks for this insight.
Yudhvir
========
On 5/30/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> "Y Sidhu" <ysidhu@gmail.com> writes:
> > The question is: Is this method of repeatedly establishing and
> > re-establishing database connections with the same 3 tables efficient?
>
> No. Launching a new backend process is a fairly expensive proposition;
> if you're striving for performance you don't want to do it for just one
> or two queries. Look into connection pooling ...
>
> regards, tom lane
>
--
Yudhvir Singh Sidhu
408 375 3134 cell
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2007-05-30 23:36 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-05-30 21:45 Database connection for Tbl_B established Y Sidhu <ysidhu@gmail.com>
2007-05-30 22:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-05-30 23:36 ` Y Sidhu <ysidhu@gmail.com>
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