Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select row_number() over (), * from
- (
- select
- load_session_id,
- m.method_name,
- http_status_code,
- min(request_date_time) min_date_time,
- max(answer_date_time) max_date_time,
- --spent_minutes считается неверно, поэтому тут убрано, брать надо из другого скрипта с длительностями
- --case when http_status_code = 200 or http_status_code is null then round((extract (epoch from (max(answer_date_time) - min(request_date_time)))/60)::decimal, 2) else null end spent_minutes,
- avg(response_time)::int avg_response_time,
- PERCENTILE_CONT(0.90) WITHIN GROUP (ORDER BY response_time)::int AS perc_90_response_time,
- min(response_time) min_response_time,
- max(response_time) max_response_time,
- count(*) request_count
- from
- ml_schema.pravo_requests r
- join ml_schema.pravo_methods m on m.method_id = r.method_id
- --where load_session_id in (3, 22, 29) and m.method_name = 'GetExecutoryProcesses'
- where load_session_id in (6, 7, 8)
- group by 1, 2, 3
- order by 4
- ) T;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement