Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Perl with Database connection.

by Anonymous Monk
on Aug 03, 2009 at 07:37 UTC ( #785378=note: print w/ replies, xml ) Need Help??


in reply to Perl with Database connection.

Either one will work


Comment on Re: Perl with Database connection.
Re^2: Perl with Database connection.
by vinoth.ree (Parson) on Aug 03, 2009 at 08:06 UTC

    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.

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

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

      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.

        Santhosh_89,

        I support ping method man.

        Update

        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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://785378]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2014-08-28 00:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (254 votes), past polls