Home » RDBMS Server » Performance Tuning » Tune the query.. (Oracle 11.1.0.6.0)
Tune the query.. [message #528031] Fri, 21 October 2011 05:28 Go to next message
muralikri
Messages: 638
Registered: August 2011
Location: chennai
Senior Member

Please help me out,how to tune query...
It' running more than hours....

select b.member_id, b.cell_id, c.mail_start_date, 'O' as event_type
from 
(select member_id, eo.cell_id
 from ftd.event_opened eo
 where nvl(eo.seedlist_ind,0)=0
 and eo.modified_on >= to_date('10-09-2011 00:00:00','mm-dd-yyyy hh24:mi:ss')
 and eo.modified_on < to_date('10-10-2011 00:00:00','mm-dd-yyyy hh24:mi:ss')
 group by member_id, eo.cell_id
) a,
ftd.event_opened b, ftd.cells c
where b.member_id = a.member_id and b.cell_id = a.cell_id
and b.cell_id=c.cell_id 
and nvl (b.seedlist_ind, 0) = 0
and c.mail_start_date >= to_date('10/01/2010','mm/dd/yyyy')
group by b.member_id, b.cell_id, c.mail_start_date
having min (b.modified_on) >= to_date('10-09-2011 00:00:00','mm-dd-yyyy hh24:mi:ss')
and min (b.modified_on) < to_date('10-10-2011 00:00:00','mm-dd-yyyy hh24:mi:ss')
Re: Tune the query.. [message #528035 is a reply to message #528031] Fri, 21 October 2011 05:31 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Usual and requested information missing.

Regards
Michel
Re: Tune the query.. [message #528039 is a reply to message #528035] Fri, 21 October 2011 05:35 Go to previous messageGo to next message
muralikri
Messages: 638
Registered: August 2011
Location: chennai
Senior Member

What else i need to post?
Re: Tune the query.. [message #528041 is a reply to message #528039] Fri, 21 October 2011 05:40 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This is not the first time you post, you should know now but I will tell you once more.

For any peformances question, please read http://www.orafaq.com/forum/mv/msg/84315/433888/102589/#msg_433888 and post the required information.

Regards
Michel
Re: Tune the query.. [message #528043 is a reply to message #528031] Fri, 21 October 2011 05:49 Go to previous messageGo to next message
pablolee
Messages: 2882
Registered: May 2007
Location: Scotland
Senior Member
Since you have 15 billion rows in each table and you are joining on non unique values that differ in datatypes, I'm amazed that your query doesn't take several days to complete. Well done, your query appears to be optimised.
Re: Tune the query.. [message #528045 is a reply to message #528043] Fri, 21 October 2011 05:53 Go to previous messageGo to next message
Roachcoach
Messages: 1576
Registered: May 2010
Location: UK
Senior Member
Needs more model clause.
Re: Tune the query.. [message #528055 is a reply to message #528045] Fri, 21 October 2011 06:10 Go to previous messageGo to next message
muralikri
Messages: 638
Registered: August 2011
Location: chennai
Senior Member

it's not tuned query.. Please help out..how to resolve this one
Re: Tune the query.. [message #528060 is a reply to message #528055] Fri, 21 October 2011 06:30 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post requested information.

Regards
Michel
Re: Tune the query.. [message #528061 is a reply to message #528055] Fri, 21 October 2011 06:31 Go to previous messageGo to next message
pablolee
Messages: 2882
Registered: May 2007
Location: Scotland
Senior Member
muralikri wrote on Fri, 21 October 2011 12:10
it's not tuned query.. Please help out..how to resolve this one

I disagree, I say it is tuned and running as fast as possible. Well done.
Re: Tune the query.. [message #528080 is a reply to message #528031] Fri, 21 October 2011 08:03 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
I ran it and it took less than one second to run.
Re: Tune the query.. [message #528081 is a reply to message #528080] Fri, 21 October 2011 08:08 Go to previous messageGo to next message
pablolee
Messages: 2882
Registered: May 2007
Location: Scotland
Senior Member
Wow! Impressive Very Happy
Re: Tune the query.. [message #528094 is a reply to message #528081] Fri, 21 October 2011 09:29 Go to previous messageGo to next message
John Watson
Messages: 8929
Registered: January 2010
Location: Global Village
Senior Member
If you set the _max_query_time_target parameter it should help.
Re: Tune the query.. [message #528108 is a reply to message #528094] Fri, 21 October 2011 12:49 Go to previous message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
It might also be quite a performance improvement if you change the where clause to :

where 1=2
Previous Topic: Need support for Query performance tuning
Next Topic: I/p on tuning select query
Goto Forum:
  


Current Time: Fri Apr 19 15:22:04 CDT 2024