mirektheprinterPolygon Block Performance
Updated 2022-07-27
999
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
›
⌄
WITH SOL AS (
SELECT avg(datediff(second , b1.block_timestamp::timestamp , b2.block_timestamp::timestamp)) as avg_time,
min(datediff(second , b1.block_timestamp::timestamp , b2.block_timestamp::timestamp)) as min_time,
max(datediff(second , b1.block_timestamp::timestamp , b2.block_timestamp::timestamp)) as max_time,
avg(b1.tx_count) as avg_tx_count,
'Solana' as network
From solana.core.fact_blocks b1 ,solana.core.fact_blocks b2
WHERE b2.previous_block_id = b1.block_id and
b1.block_timestamp <= CURRENT_DATE - 30 and
b2.block_timestamp <= CURRENT_DATE - 30 and
b2.block_timestamp > b1.block_timestamp
),
POLY AS (
SELECT avg(datediff(second , p1.block_timestamp::timestamp , p2.block_timestamp::timestamp)) as avg_time,
min(datediff(second , p1.block_timestamp::timestamp , p2.block_timestamp::timestamp)) as min_time,
max(datediff(second , p1.block_timestamp::timestamp , p2.block_timestamp::timestamp)) as max_time,
avg(p1.tx_count) as avg_tx_count,
'Polygon' as network
From polygon.core.fact_blocks p1 ,polygon.core.fact_blocks p2
WHERE p2.block_number-1 = p1.block_number and
p1.block_timestamp <= CURRENT_DATE - 30 and
p2.block_timestamp <= CURRENT_DATE - 30 and
p2.block_timestamp > p1.block_timestamp
),
ETH AS (
SELECT avg(datediff(second , e1.block_timestamp::timestamp , e2.block_timestamp::timestamp)) as avg_time,
min(datediff(second , e1.block_timestamp::timestamp , e2.block_timestamp::timestamp)) as min_time,
max(datediff(second , e1.block_timestamp::timestamp , e2.block_timestamp::timestamp)) as max_time,
avg(e1.tx_count) as avg_tx_count,
'Ethereum' as network
From ethereum.core.fact_blocks e1 ,ethereum.core.fact_blocks e2
WHERE e2.block_number-1 = e1.block_number and
e1.block_timestamp <= CURRENT_DATE - 30 and
e2.block_timestamp <= CURRENT_DATE - 30 and
e2.block_timestamp > e1.block_timestamp
),
Run a query to Download Data