Re: Slow connection to Oracle 9i
From: Peter J. Holzer (hjp_at_wsr.ac.at)
Date: 10/20/04
- Next message: Denesa K Shaw: "Stored Procedures Parameters"
- Previous message: Henri Asseily: "ANNOUNCE: DBIx::HA 0.91, High Availability for DBI"
- In reply to: Ron Reidy: "RE: Slow connection to Oracle 9i"
- Next in thread: Ron Reidy: "RE: Slow connection to Oracle 9i"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 20 Oct 2004 17:10:01 +0200 To: dbi-users@perl.org
[Rearranged quotes for better readability]
On 2004-10-19 08:23:53 -0600, Reidy, Ron wrote:
> BAXTER, LINCOLN A [mailto:lincoln.a.baxter@bankofamerica.com]:
>> Ok, then if you use Apache and mod_perl this should be easy... just open
>> connection if you don't have it (or you get and error on it), and keep it
>> around.
>>
>> Call commit (even if you have done only selects), at the end of each "event"
>> instead of close.
> This is an **extremely** bad idea. A commit() should be issues only
> when necessary - the cost in the database of a commit is large and
> doing so in this random fashion is an invitation to other performance
> problems.
I don't know what lincoln means with "event", but if it is a single http
request, then that is not a "random fashion".
An http request is often naturally a transaction - the user has clicked
on a button or link and expects that to either work or not work, but not
sort-of-work.
Also, in many environments (and I believe, mod_perl is one of them) you
have absolutely no guarantee that two consecutive requests from the same
"session" will get the same database connection at the server - if you
want any changes to be visible from one request to the next you have to
commit at the end of the request.
hp
-- _ | Peter J. Holzer | Shooting the users in the foot is bad. |_|_) | Sysadmin WSR / LUGA | Giving them a gun isn't. | | | hjp@wsr.ac.at | -- Gordon Schumacher, __/ | http://www.hjp.at/ | mozilla bug #84128
- application/pgp-signature attachment: stored
- Next message: Denesa K Shaw: "Stored Procedures Parameters"
- Previous message: Henri Asseily: "ANNOUNCE: DBIx::HA 0.91, High Availability for DBI"
- In reply to: Ron Reidy: "RE: Slow connection to Oracle 9i"
- Next in thread: Ron Reidy: "RE: Slow connection to Oracle 9i"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]