Skip to content

Commit 6b56854

Browse files
style
1 parent 6257774 commit 6b56854

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

content/en/altinity-kb-useful-queries/ingestion-rate-part_log.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ description: >-
66
Query to gather information about ingestion rate from system.part_log.
77
---
88

9+
## Insert rate
910
```sql
10-
-- Insert rate
1111
select database, table, time_bucket,
1212
max(number_of_parts_per_insert) max_parts_pi,
1313
median(number_of_parts_per_insert) median_parts_pi,
@@ -52,18 +52,19 @@ GROUP BY query_id, database, table, time_bucket
5252
)
5353
GROUP BY database, table, time_bucket
5454
ORDER BY time_bucket, database, table ASC
55+
```
5556

56-
-- New parts per partition
57+
## New parts per partition
58+
```
5759
select database, table, event_type, partition_id, count() c, round(avg(rows))
5860
from system.part_log where event_date >= today() and event_type = 'NewPart'
5961
group by database, table, event_type, partition_id
6062
order by c desc
6163
```
6264

65+
## Too fast inserts
6366

64-
### Too fast inserts
65-
66-
It should be not often than 1 insert per table per second (60 inserts per minute)
67+
It should not be more often than 1 insert per table per second (60 inserts per minute)
6768

6869
```
6970
select toStartOfMinute(event_time) t, database, table, count() c, round(avg(rows))

0 commit comments

Comments
 (0)