Created
May 11, 2015 10:09
-
-
Save Spaider/1d1fa643477d8d3103ed to your computer and use it in GitHub Desktop.
neo4j health summary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with summary as ( | |
select | |
r.QueryId, | |
r.QueryTime, | |
r.Result, | |
row_number() over (partition by r.QueryId order by r.QueryTime desc) as rk | |
from vr_t_Neo4jHealthResult r | |
) | |
select | |
s.QueryId, | |
s.QueryTime, | |
q.Comment, | |
s.Result, | |
case q.Severity | |
when 0 then 'Stats' | |
when 1 then 'Warning' | |
when 2 then 'Critical' | |
end | |
from | |
summary s | |
inner join vr_t_Neo4jHealthQuery q | |
on q.QueryId = s.QueryId | |
where | |
s.rk = 1 | |
order by | |
q.Severity desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment