-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathqueries.json
More file actions
43 lines (43 loc) · 1.94 KB
/
Copy pathqueries.json
File metadata and controls
43 lines (43 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
"queries": [
{
"id": "full_count",
"label": "Full-file count",
"logq": "select count(*) from it",
"duckdb": "SELECT count(*) FROM read_ndjson_auto('{data}')",
"clickhouse": "SELECT count() FROM file('{data}', JSONEachRow)",
"angle_grinder": "* | json | count"
},
{
"id": "selective_filter",
"label": "Selective status filter",
"logq": "select count(*) from it where status_code = 503",
"duckdb": "SELECT count(*) FROM read_ndjson_auto('{data}') WHERE status_code = 503",
"clickhouse": "SELECT count() FROM file('{data}', JSONEachRow) WHERE status_code = 503",
"angle_grinder": "* | json | where status_code == 503 | count"
},
{
"id": "group_by_status",
"label": "Group by status",
"logq": "select status_code, count(*) as count from it group by status_code",
"duckdb": "SELECT status_code, count(*) AS count FROM read_ndjson_auto('{data}') GROUP BY status_code",
"clickhouse": "SELECT status_code, count() AS count FROM file('{data}', JSONEachRow) GROUP BY status_code",
"angle_grinder": "* | json | count by status_code"
},
{
"id": "top_latency",
"label": "Top-10 latency",
"logq": "select request_id, latency from it order by latency desc limit 10",
"duckdb": "SELECT request_id, latency FROM read_ndjson_auto('{data}') ORDER BY latency DESC LIMIT 10",
"clickhouse": "SELECT request_id, latency FROM file('{data}', JSONEachRow) ORDER BY latency DESC LIMIT 10"
},
{
"id": "user_agent_like",
"label": "User-agent substring",
"logq": "select count(*) from it where user_agent like \"%Chrome%\"",
"duckdb": "SELECT count(*) FROM read_ndjson_auto('{data}') WHERE user_agent LIKE '%Chrome%'",
"clickhouse": "SELECT count() FROM file('{data}', JSONEachRow) WHERE user_agent LIKE '%Chrome%'",
"angle_grinder": "* | json | where contains(user_agent, \"Chrome\") | count"
}
]
}