I am working on Data Migration Queries for migrating one version of product to another version, While writing data migration scripts I need to write scripts to fetch Before Data i.e. select required data before running Data Migration script and After data i.e. select required data after running Data Migration script. (to verify before and after result in out file)
In before and after script I am using simple select statements without order by clause.
My query is ,
Can I use order by clause for every select script as customer is going to run them on production environment, What will be impact on performance because of Order by Clause.
Will order by clause affect run time or memory utilization.
Many select statements return record count > 100000.
DB2 Version 9.1 on AIX