Home » RDBMS Server » Server Utilities » records are not getting loaded in order in 10g ( 8i->10g)
records are not getting loaded in order in 10g ( 8i->10g) [message #266700] Tue, 11 September 2007 08:03 Go to next message
joseorafaq
Messages: 1
Registered: September 2007
Junior Member
Hi,

I have taken an export using exp.exe in oracle 8.1.7.
(My source database is in oracle 8.1.7)

Then I have imported this dump file to oracle 10g schema(Oracle 10.2.0.1) using imp.exe in oracle 10g.

issue is that ,I am not getting the records in the order as in 8i
stored.

for example:
Table T1 is having 1 million records( in the oracle 8i database schema)
here c1 is the PK , and the values are generated using a sequence.

c1 c2
-- ---
1 aaa
2 bbb
3 ccc
4 ddd
5 eee
...
....
....

After doing import to oracle 10g, then the order in which the records got inserted are like

c1 c2
-- ---
4 ddd
1 aaa
2 bbb
5 eee
3 ccc
...
...
....

Can anybody tell me what must be the reason, these records are
getting loaded in this way?

I have loaded 200 tables ,but the issue happend only for few tables only. what must be the reason? pls help.

do we need to set some server level parameters?
is it becuase of parallel loading or some thing?

(In application end , the developers expected this order in the records and skipped the ORDER BY clause. Because of this , after migration from 8i to 10g , they will be required to make code changes in many places)

Thanx
Jose
[EDITED by LF - removed unnecessary empty lines at the end of a message]

[COMMENT by LF - shame on your developers!]

[Updated on: Tue, 11 September 2007 14:42] by Moderator

Report message to a moderator

Re: records are not getting loaded in order in 10g ( 8i->10g) [message #266702 is a reply to message #266700] Tue, 11 September 2007 08:08 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
joseorafaq wrote on Tue, 11 September 2007 09:03

(In application end , the developers expected this order in the records and skipped the ORDER BY clause. Because of this , after migration from 8i to 10g , they will be required to make code changes in many places)



Isn't that a pity. That's what you get when you have poor developers.

There is no such thing as ORDER in a database unless you give an order by directive upon selecting the data. Expecting it to be in any given order will lead to your problem. Any competent developer should know this.
Re: records are not getting loaded in order in 10g ( 8i->10g) [message #266709 is a reply to message #266700] Tue, 11 September 2007 08:19 Go to previous messageGo to next message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
That is one of the very 1st things taught in Oracle programming. You are NEVER guaranteed the order of a result set returned from a query unless the ORDER BY clause is used.

All that rework for the lack of one extra line of typing.

[Updated on: Tue, 11 September 2007 08:20]

Report message to a moderator

Re: records are not getting loaded in order in 10g ( 8i->10g) [message #266711 is a reply to message #266700] Tue, 11 September 2007 08:21 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
In addition,
Please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.

Regards
Michel
Previous Topic: Size rquired for Export and Import of database
Next Topic: import error 1438
Goto Forum:
  


Current Time: Sat Dec 03 22:14:10 CST 2016

Total time taken to generate the page: 0.26232 seconds