MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

question about clustering

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
jctgf
Beginner


Joined: 05 Nov 2006
Posts: 89
Topics: 36

PostPosted: Wed Dec 15, 2010 6:11 am    Post subject: question about clustering Reply with quote

hi,

i'd like to have a table whose lines are physically sorted in a given sequence.

this is because we need to run a select under cics and if we use an orderby clause to sort the lines online, this select probably won't be completed in time. this is because they have a lot of restrictions here on how long a select can take under cics and when the query takes too long, the application is aborted by a monitor called Solve.

so, having the table clustered would make possible not to run the orderby.

i was told the clustering table may not be always sorted the way it is expected to be, though, and that a reorg my be necessary from times to times.

is it true? despite defining a table clustered by certain columns, is it possible the the lines are not physically sorted by the clustering criteria?

thanks
Back to top
View user's profile Send private message Send e-mail
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Wed Dec 15, 2010 7:55 am    Post subject: Reply with quote

As alsways: If you want a result set from a SELECT statement in an ordered sequence, you have to code an ORDER BY.

If the rows are already in clustered sequence, the execution time of the SELECT itself will benefit. But since clustering may decline over time, you cannot be shure about the sequemce of an answer set.

Depending of the INSERT patterns and the freespace you provide for your tablespace, clustering cannot be taken for granted.

regards
Christian
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group