Results 1 to 4 of 4

Thread: tuning

  1. #1
    Join Date
    Nov 2013
    Posts
    2

    Unanswered: tuning

    Hi All

    query taking more time to run.
    SELECT ......

    FROM TEST.CITY A
    JOIN TEST.TOWN D
    ON D.COD = A.COD [COD is char ]
    AND D.COD_N = A.COD_N [COD_N is char ]
    AND D.NR = A.NR [NR is decimal ]
    AND D.DT = A.DT [DT is timestamp ]
    LEFT JOIN TEST.L_RO RO
    ON RO.COD = A.COD
    AND RO.COD_N = A.COD_N
    AND RO.NR = A.NR
    AND RO.DT = A.DT

    .............

    TABLE A and D are having around 1 million on each

    joining columns on both the tables have same data types and size
    cluster ratio is above 75 in both indexes on tables A and D but they are
    not using indexes and it is going for table scan. Can you please suggest.Thanks.

  2. #2
    Join Date
    Nov 2013
    Posts
    2
    reorg done today and performed runstats as well

  3. #3
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    db2advis -s "your_statement" is telling you what?
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

  4. #4
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    by what you have shown here in the SQL there has to be one tablespace scan as there are no inputs being given to filter the data, you are just saying give me everything where the keys match.

Posting Permissions

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