DB2 query processing order

08 January,2011 by Tom Collins

When constructing a sql statement on DB2 , keep in mind the processing order of the various parts  of the sql statement.This could allow significant performance gains

FROM

JOIN ON

WHERE clause

GROUP BY and aggregate

HAVING clause

SELECT

ORDER BY

FETCH FIRST

 

For example, you could consider the initial dataset brought in by the FROM clause , and the WHERE clause.

Or could you create more efficient JOIN ON clauses?

 

 

 Ref:Jack Vamvas(http://www.dba-db2.com)

 

Author: Rambler(http://www.dba-db2.com)

Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on DB2 query processing order

Comments are moderated, and will not appear until the author has approved them.


dba-db2.com | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright