Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    1

    Unanswered: SQL performance tunning

    Hi,
    I want to fine tune my query to reduce the time of execution. In SQL select statement there is

    WHERE CHECK_NO_INTERNAL > :H

    We modified by using

    WHERE CHECK_NO_INTERNAL BETWEEN :H AND :H. It reduces the time. Is there any other way to optimize this query execution.

    Thanks in advance
    Shyam

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    You can try to run more detailed runstats (with distribution) on the table. Without knowing the distribution of values on the table, DB2 assumes that > or < will return more rows than a "between". This can affect whether DB2 chooses to use an index. You can also try to alter the table to set it VOLATILE, which usually encourages DB2 to use an index that might not ordinarily be used.
    Last edited by Marcus_A; 08-17-04 at 12:05.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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