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,000 of 2,288   
   Witold Andrzejewski to Ryan Wagner   
   Re: I need records to be in the same ord   
   08 Feb 05 10:50:05   
   
   From: witold.andrzejewski@gmail.com   
      
   Ryan Wagner wrote:   
   > I am doing many SQL insert statements to insert records into an oracle   
   > database. I need the order of the records, after inserting all records, to   
   > be the same as the order I inserted them in. Right now my program fails to   
   > keep the records in order if the number of records is large. I inserted   
   > 100,000 records and the first record after all inserts were done was   
   > record#540. I have been told that the /*+ APPEND */ hint and /*+ PARALLEL */   
   > hint can accomplish this. Is this correct? I want to avoid using ORDER BY at   
   > all costs as its slow and I can't affort the slowdown. Has anyone else had   
   > this problem? and can help.   
   >   
   > Example: If I insert records with employee numbers 1 throughy 100,000 into   
   > the oracle database in ascending order, then the first record viewed after   
   > inserting all records should be record with employee number1. The last   
   > record should be record with employee number 100, 000.   
   >   
   > thanks.   
   >   
   > Ryan   
   >   
   >   
   Making Oracle store data in an order you want is impossible. The closest   
   solution would be to create an index or an index organized table. Oracle   
   will then use the order in index to optimize the ORDER BY.   
      
   Witold Andrzejewski   
      
   --- 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