Mufasaaverage time between blocks - Polygon vs solana vs arbitrum?
Updated 2022-07-26Copy Reference Fork
99
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
›
⌄
-- SELECT
-- (86400 / count(hash)) as seconds_between_blocks,
-- block_timestamp::date as date
-- from polygon.core.fact_blocks
-- where date >= current_date - 1
-- group by date
-- order by 2 desc
with polygon as (
SELECT
AVG(DATEDIFF(SECOND, a.block_timestamp, b.block_timestamp)) as AVG_time_between_polygon_blocks
FROM polygon.core.fact_blocks a
JOIN polygon.core.fact_blocks b
on a.block_number= b.block_number - 1
), solana as (
SELECT
AVG(DATEDIFF(SECOND, a.block_timestamp, b.block_timestamp)) as AVG_time_between_solana_blocks
FROM solana.core.fact_blocks a
JOIN solana.core.fact_blocks b
on a.block_id= b.block_id - 1
), arbitrum as (
SELECT
AVG(DATEDIFF(SECOND, a.block_timestamp, b.block_timestamp)) as AVG_time_between_arbitrum_blocks
FROM arbitrum.core.fact_blocks a
JOIN arbitrum.core.fact_blocks b
on a.block_number= b.block_number - 1
)
select AVG_time_between_polygon_blocks, AVG_time_between_solana_blocks, AVG_time_between_arbitrum_blocks
from polygon, solana, arbitrum
Run a query to Download Data