Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P17737
(An Untitled Masterwork)
Active
Public
Actions
Authored by
awight
on Nov 12 2021, 12:42 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F34743283: raw-paste-data.txt
Nov 12 2021, 12:42 PM
2021-11-12 12:42:12 (UTC+0)
Subscribers
None
with
time_range
as
(
select
*
from
event
.
mediawiki_api_request
where
year
=
2021
and
month
=
11
and
day
=
1
),
mapdata_request
as
(
select
database
,
backend_time_ms
,
api_error_codes
,
params
,
is_wmf_domain
,
element_at
(
http
.
request_headers
,
'user-agent'
)
as
raw_ua
from
time_range
where
element_at
(
params
,
'action'
)
=
'query'
and
element_at
(
params
,
'prop'
)
=
'mapdata'
)
select
count
(
*
)
as
sample_size
,
-- count(api_error_codes) as error_count,
-- array_frequency(coalesce(api_error_codes)) as errors_by_code,
approx_most_frequent
(
2
,
case
raw_ua
when
'kartotherian (yurik @ wikimedia)'
then
'kartotherian'
else
'other'
end
,
100000
)
as
is_kartotherian
,
approx_most_frequent
(
2
,
case
is_wmf_domain
when
true
then
'is_wmf'
else
'not_wmf'
end
,
100000
)
as
is_wmf_domain
,
approx_most_frequent
(
50
,
database
,
100000
)
as
database
-- approx_percentile(backend_time_ms, 0.50) as backend_time_ms_p50,
-- approx_percentile(backend_time_ms, 0.70) as backend_time_ms_p70,
-- approx_percentile(backend_time_ms, 0.95) as backend_time_ms_p95
from
mapdata_request
;
Event Timeline
awight
created this paste.
Nov 12 2021, 12:42 PM
2021-11-12 12:42:12 (UTC+0)
awight
mentioned this in
T295589: Upgrade Presto to access UDF library improvements
.
Log In to Comment