home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,367 of 2,288   
   Jim Kennedy to Mark A Framness   
   Re: Array selection and update.   
   30 Apr 04 00:09:52   
   
   From: kennedy-downwithspammersfamily@attbi.net   
      
   "Mark A Framness"  wrote in message   
   news:8168768c.0404291411.31ac17f2@posting.google.com...   
   > Greetings,   
   >   
   > I am working on a project and we need to write a conversion script to   
   > initialize a new field on a table. The number of records on this table   
   > is on the order of millions so routine selection and update takes a   
   > long time.   
   >   
   > I am tasked with writing a pl/sql proc that utilizes array processing   
   > to update the column.   
   >   
   > Since all of the fields I am going to update are null, does it pay to   
   > create a array-based select prior to updating? I was thinking of   
   > array-selecting and then array updating 5000 at a crack. Or should I   
   > just write a single update statement? Does the former approach (think   
   > F-former F-first) perhaps give us the ability to commit where the   
   > later (l-later l-last) does not?   
   >   
   > What I have tried to do is bulk select the key fields into appropriate   
   > arrays, I then bind those arrays to the update fields. Then I call the   
   > update statement. These steps are performed in a while loop until the   
   > number of records retrieved is less than the the max number to   
   > fetch/pass.   
   >   
   > If you have a small little example of what I am trying to do, please   
   > post it.   
   >   
   > Thank You   
   > }\/{ark   
      
   Why not   
   update mytable set myField=WhateverYouWantTheFieldToBe;   
   commit;   
   That will be fastest.   
   Jim   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca