Posted: Wed Dec 15, 2010 6:11 am Post subject: question about clustering
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?
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.
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