[Dbix-class] many updates at once

Martin Spevak martin.spevak at hp.com
Thu Aug 20 12:11:34 GMT 2015

Hi all,

I have specific problem with DBIx update (Oracle driver). I need to 
update let say 200.000 rows. Each row should have different number of 
changed columns. DBIx->update creates request one by one like this: 
"update table set column1='value' where id=1". Query itself is really 
small (few bytes), but for each query is created packet. So I have to 
transfer 200.000 packets. Ping to DB server is 4ms, what mean that 1000 
updates are done in 4 seconds and the job is done in 13 minutes. I need 
to somehow decrease number of packets, let say to send more updates at 
once. Do you have some idea how to do it? I don't care if update is 
success or not. Some kind of bulk update. My idea was to send all UPDATE 
queries as strings into storage procedure (let say per 10 queries). So I 
try to get this query from DBIx somehow as ResultSet->as_query (but this 
is not possible for update command).

Do you have any other ideas, how to send few update commands in one packet?

Many thanks.

*Martin (singer) Spevak*
HPES Software Development Engineer
HPES Network Management Solutions
Location: Galvaniho 7/A, Bratislava, Slovakia
Tel.: +421 2 5752 5390
Email: martin.spevak at hp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20150820/c69f3efa/attachment.htm>

More information about the DBIx-Class mailing list