develooper Front page | perl.beginners | Postings from August 2009

Re: delete 20 000 records in oracle from perl

Thread Previous | Thread Next
luke devon
August 17, 2009 02:01
Re: delete 20 000 records in oracle from perl
Message ID:

Since i have more binary data to be deleted in the requested query , i have to use a external script/program to satisfy the deletion. So thats why i wanted to know , how can we implement multi threading for the situation. 


From: Raymond Wan <>
To: luke devon <>
Cc: Perl <>
Sent: Monday, August 17, 2009 14:39:12
Subject: Re: delete 20 000 records in oracle from perl

Hi Luke,

luke devon wrote:
> Thanks for the reply . Yes , when we going to delete those records , CPU is
> going high.So then its effecting to the performance. as i beginner in perl ,
> how can i implement multi-threaded env ? Can you help me further ?

Hmmmmm, well, I don't see any advantage of a multi-threaded version [perhaps someone else can see something I can't?].  Also, I have to admit that I don't know how to run Perl in a multi-threaded env.  [Sorry!]

But, before going down that path, how about creating multiple instances of Perl.  I would think doing this is much easier and give you the same benefits.  Have you considered this?

One reason for my skepticism is that your problem is in the SQL statement.  What Perl is doing is simply to act as a wrapper around it.  A multi-threaded Perl script needs to know how to partition the tables so that they don't step on each other's toes; but it's the SQL that needs to worry about it.  If there was a trivial way to separate the rows (i.e., "pkey = 1" for one set of rows and "pkey = 2" for another set), then you could run two instances of Perl to do this.

i.e., one does:  "delete rec1,rec2 " from tb1 where pkey = 1" and the other does the same but with "pkey = 2"...


PS:  Even live servers like Amazon have downtime.  Is it critical that you can't bring the server down once a day or week for 2 minutes?

      New Email names for you! 
Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail. 
Hurry before someone else does!
Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About