query tuning [message #244603] |
Wed, 13 June 2007 08:44 |
dr46014
Messages: 49 Registered: February 2007
|
Member |
|
|
select a.CURRENT_ACCOUNT_NBR,b.MTH_CODE
from CUST_EQX_ACCT_DIM a, CUST_EQX_MTHLY_CB_FACT b
where
a.client_id = 'MEIJERDUAL' and b.MTH_CODE = '200705' and
b.EQUIFAX_CUST_ID=a.EQUIFAX_CUST_ID
this is the query i am using to pull data.this query is taking more than 12 hrs.a contains 68 million data and b contains 200 million data.any suggestions..
|
|
|
|
Re: query tuning [message #244694 is a reply to message #244603] |
Wed, 13 June 2007 15:32 |
michael_bialik
Messages: 621 Registered: July 2006
|
Senior Member |
|
|
How many distinct values do you have for :
- client_id
- EQUIFAX_CUST_ID
- MTH_CODE ?
How many rows have MTH_CODE = '200705' ?
How many rows have client_id = 'MEIJERDUAL' ?
Do you have indxes on client_id , EQUIFAX_CUST_ID ( in both tables), mth_code?
[Updated on: Wed, 13 June 2007 15:33] Report message to a moderator
|
|
|