Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Performance problems when using multi-threads in Oracle 9i

Re: Performance problems when using multi-threads in Oracle 9i

From: Patrick TJ McPhee <ptjm_at_interlog.com>
Date: Sun, 14 Apr 2002 19:24:48 +0000 (UTC)
Message-ID: <a9cl1v$rp3$1@news.ca.inter.net>


In article <804a1aa9.0204140441.25f0e01a_at_posting.google.com>, Loai Garelnabi <gloai_at_hotmail.com> wrote:

% I have a program that creates many threads. Each thread has its own
% context. The thread will connect to the database, execute a stored
% procedure and then exits.

[...]

% This process is generating a huge load on the sever machine (100 %)
% and the program is very very slow. [...]

% The program would use less load if I comment out the thread related
% statements.
%
% I would appreciate any suggestions on how to solve this probelm.

You could comment out the thread-related statements.

Each of your threads is performing more work just setting itself up than it does once it gets ready to go. You need to set up a small number of threads and keep them running all the time. It's probably better if they share the database connection, but that doesn't matter too much provided you keep them running all the time, probably waiting for work to be added to a queue. Whenever you want to execute a procedure in the background, have the thread execute the procedure then go back to waiting.

--

Patrick TJ McPhee
East York  Canada
ptjm_at_interlog.com
Received on Sun Apr 14 2002 - 14:24:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US