Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003

    Question Unanswered: pure sql performance

    Iam using UDB 7.1 on AIX 5.1 in a DW project.

    We are facing a lot of performance problems in report sqls.While I spent a lot of time understanding how the optimizer interprets the sql written, I could not come to any conclusions. Its always baffling and frustrating trying to do this.

    So, as a generic rule, I would like to know the best ways(guidelines) of writing a sql. And by any chance can we fool the optimizer for better perfomance - I've heard abt adding bogus predicates, etc, might improve query performance. Any help in this regd would be great.

    thanks in advance,

  2. #2
    Join Date
    May 2003
    This is a complicated question for which there is no easy answer. DB2 performance depends on several factors, not just the way the SQL is coded. Sometimes the SQL statement can be rewritten for better performance, but typically there are more fundamental problems that need to be addressed.

    One of the most important factors to good performance is the design of the database (especially the table and index design). Without a good design, you are fighting an uphill battle.

    I would suggest that try to get some consulting help if you don't have expertise in your organization. Someone could look at your installation and database design and give some good pointers in just a few days. Obviously, a complete redesign would probably require more than a few days.

    The only other option would be for you to post the specific table and index design, and list the SQL queries that are giving you problems. Be sure to include as many details as possible, including table size and distribution of data. If you do this, please do not leave out any details and include the entire DDL of all the relevant objects.
    Last edited by Marcus_A; 09-08-03 at 10:48.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts