Unix Technical Forum

Database connection for Tbl_B established

This is a discussion on Database connection for Tbl_B established within the Pgsql Performance forums, part of the PostgreSQL category; --> I have a question regarding "connection for xxyy established" The situation below shows records being added to 3 tables ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 10:54 AM
Y Sidhu
 
Posts: n/a
Default Database connection for Tbl_B established

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 10:54 AM
Tom Lane
 
Posts: n/a
Default Re: Database connection for Tbl_B established

"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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 10:54 AM
Y Sidhu
 
Posts: n/a
Default Re: Database connection for Tbl_B established

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:00 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com