Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Tune a query with where clause that has a function

$
0
0
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.

Viewing all articles
Browse latest Browse all 13329

Trending Articles