piperPolygon - Polygon Block Performance: Time between blocks (All)
Updated 2022-07-24
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
›
⌄
⌄
/*
Polygon - Polygon Block Performance
What is the average time between blocks on Polygon?
What was the maximum and minimum recorded time between two blocks?
How many transactions are done in a block on average? How do these
numbers compare to L1 such as Flow or Solana, or other L2 such as
Arbitrum or Optimism?
*/
WITH poly_time_between_blocks AS (
SELECT
block_timestamp,
block_number,
TIMESTAMPDIFF(second, LAG(block_timestamp) OVER (ORDER BY block_timestamp), block_timestamp) AS time_between_blocks
FROM
polygon.core.fact_transactions
WHERE
block_timestamp BETWEEN '2022-06-23' AND '2022-07-23'
GROUP BY block_timestamp, block_number
),
eth_time_between_blocks AS (
SELECT
block_timestamp,
block_number,
TIMESTAMPDIFF(second, LAG(block_timestamp) OVER (ORDER BY block_timestamp), block_timestamp) AS time_between_blocks
FROM
ethereum.core.fact_transactions
WHERE
block_timestamp BETWEEN '2022-06-23' AND '2022-07-23'
GROUP BY block_timestamp, block_number
),
Run a query to Download Data