SQL Performance (MOSC)

MOSC Banner

How to improve this sql query?

edited Jun 18, 2013 10:29PM in SQL Performance (MOSC) 12 commentsAnswered ✓
I have a user asking me to improve following query. I am not sure where to start. By looking at the query, it seems try by the subquery to find the top 10 eventid , then pull other information from the main query. 
Our DB version is 11.2.0.3.

Please kindly help me here.

Thanks.

SELECT inet_ntoa(s.SRC_IP_NO) AS sourceIpStr, LPAD(s.AGG_GROUP_TS, 9) AS aggGroupDate, SUM(s.EVENT_COUNT) AS eventCount

FROM SRC_IP_HGRAM s

WHERE s.AGG_GROUP_TS >= fromDate

                AND s.AGG_GROUP_TS < toDate

                AND s.LOCATION_ID = locationId

                AND s.CLIENT_ID = clientId

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