Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Rows not in the order of Clustering index.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ami777us

New User


Joined: 06 Apr 2007
Posts: 33
Location: USA

PostPosted: Tue Sep 23, 2008 12:44 am    Post subject: Rows not in the order of Clustering index.
Reply with quote

A program inserted rows into a DB2 table in the order of the clustering index but when the rows are viewed in DB2 Fileaid utility, they donot appear to be in the order the rows were physically inserted by the application. Any ideas ??
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Sep 23, 2008 1:45 am    Post subject:
Reply with quote

Hello,

Quote:
they donot appear to be in the order the rows were physically inserted by the application. Any ideas ??
Why do you expect them to be? Physical sequence has little meaning in database data. . .

Possibly there is something i misunderstand.
Back to top
View user's profile Send private message
ami777us

New User


Joined: 06 Apr 2007
Posts: 33
Location: USA

PostPosted: Tue Sep 23, 2008 2:08 am    Post subject: Reply to: Rows not in the order of Clustering index.
Reply with quote

It is more easily readable/understandable if rows are ordered in the sequence its inserted. The order is very important for the application and therefore validating the order will surely save us a lot of time.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Tue Sep 23, 2008 2:21 am    Post subject: Reply to: Rows not in the order of Clustering index.
Reply with quote

Quote:
The order is very important for the application and therefore validating the order will surely save us a lot of time


that' s why the select statement has the clause order by
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Sep 23, 2008 2:33 am    Post subject:
Reply with quote

Hello,

Quote:
The order is very important for the application and therefore validating the order will surely save us a lot of time.
Hopefully, any and all application requirements can be met using ORDER BY.

Physical sequence of data should not be counted on. As the old IBM caveat says "the results may be unpredictable". If you do not use an order by in your select, you cannot depend on the sequence of the data returned.

If you test with small amounts of test data, you may successfully test only to have problems when there i more volume and rows are frequently inserted, updated, and deleted.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us