Home » RDBMS Server » Performance Tuning » query tuning
query tuning [message #244603] Wed, 13 June 2007 08:44 Go to next message
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 #244615 is a reply to message #244603] Wed, 13 June 2007 09:02 Go to previous messageGo to next message
Michel Cadot
Messages: 68651
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Read and follow Performance Tuning Sticky

Regards
Michel
Re: query tuning [message #244694 is a reply to message #244603] Wed, 13 June 2007 15:32 Go to previous message
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

Previous Topic: SQL Tuning
Next Topic: Improving performance of insert statement
Goto Forum:
  


Current Time: Fri May 17 00:02:13 CDT 2024