Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^2: Perl with Database connection.

by vinoth.ree (Monsignor)
on Aug 03, 2009 at 08:06 UTC ( #785389=note: print w/replies, xml ) Need Help??

in reply to Re: Perl with Database connection.
in thread Perl with Database connection.

Is it you are telling that both the method are same?

I have been using the ping method from the DBI module every time I execute a Postgresql query.

Replies are listed 'Best First'.
Re^3: Perl with Database connection.
by Anonymous Monk on Aug 03, 2009 at 08:13 UTC
    Is it you are telling that both the method are same?

    Essentially. Keep a connection open is only better under high traffic (like perlmonks)

Re^3: Perl with Database connection.
by santhosh_89 (Scribe) on Aug 03, 2009 at 08:23 UTC

    hello ree,
    I am not asking which method you are using.I need to know creating the many connection is better or creating a single connection(global) is better.I need to know will it cause any data base and performance issue.


      I support ping method man.


      Instead of connecting to the database every time when you execute the query, you connect with the database and by calling the ping method from DBI you can check the database connectivity, if the connection is alive, execute the query otherwise call the connect function and create database connection.

        Dear ree
        Ok,It is used for checking the connection is alive or not. I want to know which logic is better(global connection or multiple connection).I hope that you will understand now.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://785389]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2018-05-21 05:59 GMT
Find Nodes?
    Voting Booth?