View previous topic :: View next topic
|
Author |
Message |
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
I'm using DB2 utility to unload data from table, and the generated sequenced file will be later be used by DFsort.
I'm not sure whether the UNLOADed data will keep the same ascending oreder as specified by PK when the table was defined.
If the unloaded data is already sorted by PK, there will be no need for another SORT. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
So what did you see when you unloaded a similar, test, table and looked at the unloaded data? |
|
Back to top |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
I can see data is basically the same order as the PK.
but from job log, I cannot see SORT processing during the unload.
I cannot find such description from DB2 Utility reference either, so, I'm not sure about my suspect. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
if there is no sort process during the unload,
and the rows are in PK order,
then the table has been recently reorgd and no inserts have been made
to disrupt the 'order'.
unless you request a sort (ORDER BY) during any db2 selection process,
the order of the selected rows is unpredictable.
it would be an error to assume anything else. |
|
Back to top |
|
|
|