Skip to content

Instantly share code, notes, and snippets.

@asigatchov
Created November 4, 2016 19:29
Show Gist options
  • Save asigatchov/5735436f95159f3147130e972de8b891 to your computer and use it in GitHub Desktop.
Save asigatchov/5735436f95159f3147130e972de8b891 to your computer and use it in GitHub Desktop.
Поиск медленных страниц по acces.log через clickhouse
SELECT
ip,
avg(resp_time) AS avg_time,
domain,
path
FROM access_log
WHERE event_date = '2016-11-01'
GROUP BY
path,
ip,
domain
ORDER BY avg_time DESC
LIMIT 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment