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 2,158 of 2,288   
   Tor Hovland to All   
   Re: Using FORALL with associative arrays   
   16 Nov 05 13:57:43   
   
   From: teh@nospam.com   
      
   Responding to myself here, as nobody else seem willing to :-)   
      
   It finally dawned on me that I can simulate LIMIT by taking manual   
   control over the FORALL range. The following procedure is a very   
   performant and scalable way to push data into oracle.   
      
      PROCEDURE testfast(par1 in testarray) is   
        startPos int;   
        endPos   int;   
      begin   
        startPos := par1.first;   
      
        loop   
          endPos := startPos + 100;   
      
          if endPos > par1.last then   
            endPos := par1.last;   
          end if;   
      
          FORALL i IN startPos .. endPos   
            insert into dummy (test) values (par1(i));   
      
          startPos := endPos + 1;   
      
          exit when endPos = par1.last;   
        end loop;   
      end;   
      
   --- 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