harsha_james
asked on
Impact of Order By on performance (Production Env.)
Hi All,
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
and thats why there exists pages like: http://dev.mysql.com/doc/refman/5.0/en/order-by-optimization.html
and
http://www.mysqlperformanceblog.com/2006/09/01/order-by-limit-performance-optimization/