Articles & Content

Archives

F16 - Advanced SQL and The Power of Rewriting Queries

Topic: Cross Platform DB2 for z/OS & LUW

Subtopic: 2016



Get ready to go deep with Structured Query Language (SQL) and become a power user. Whether you are being asked to solve complicated problems with SQL or you need to read and understand complex SQL that is already written, this session is for you! When it comes to performance and tuning of a program or query, I often tell developers who are not sure where to start or how to read a DB2 EXPLAIN to try and rewrite any queries or any of the queries’ predicates a different way. This often times sends the optimizer down a different access path in gathering up the data. That is the goal of performance tuning. When trying to get a query to run more efficiently, we somehow need to get the current access path to change and execute differently. One way that often works is rewriting the query a different way. Many developers cannot think of different ways to rewrite queries, and sometimes there may not always be a different way to rewrite a query. But in SQL programming, we can never have enough examples of SQL code. This session will cover a number of examples in writing queries different ways and break down the different processing of the queries within DB2.



Click Here to Download

NOTE: These are only open to members of IDUG. If you are not a member, please CLICK HERE for more information.