Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2013
    Posts
    19

    Unanswered: Tune a query with where clause that has a function

    Hi,

    We have a query extracting data from a database that looks something like
    Code:
    Select * from <tablename> 
    WHERE SUBSTR(ACCT_TYPE) IN (a,b,c,d) 
    AND bal<0;
    The table has more than 50 million records. The connector takes a very long time to read this data. In 1.5 hours, it managed to read only 1.5 million rows. Any advise on how to tune this query? We have an index on ACCT_TYPE.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Try coming up with a way to get the data you want WITHOUT using the function on the Table Column.

    Andy

Posting Permissions

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