Database Tuning (MOSC)

MOSC Banner

Select statement is running more than 6 hours

edited Jun 13, 2018 10:49AM in Database Tuning (MOSC) 11 commentsAnswered
 Guys,

10.2.0.5
Linux AS4.

This below query runs more than 6 hours. We don't have long running queries, no blocking sessions, no db/table locks and we have indexes on this table.

select Deviceinstanceguid,to_char(LOCATIONTIME,'IW') week ,ABSTRACTMESSAGETYPECD,count cnt 
from devicetravelstatushistory
where abstractmessagetypecd IN ('IN1HI','POWUP') 
AND LOCATIONTIME>=to_date('01-JAN-2012 00:00:00','DD-MON-YYYY HH24:MI:SS')
and LOCATIONTIME<to_date('18-APR-2012 00:00:00','DD-MON-YYYY HH24:MI:SS')
AND Deviceinstanceguid IN('61429','63302','204486','202034','205823')
group by Deviceinstanceguid,to_char(LOCATIONTIME,'IW'), ABSTRACTMESSAGETYPECD;

Could anybody help me on this to improve the response time for this query ? Suggestions plz.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center