Skip to content

Commit 7e4530f

Browse files
committed
Update schema
1 parent 144585d commit 7e4530f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

internal/tools/clickhouse/0002_clickhouse_create_logs_table.sql

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,23 @@ CREATE TABLE IF NOT EXISTS logs (
3737
transaction_index,
3838
log_index
3939
),
40-
PROJECTION chain_topic0_projection
40+
PROJECTION chain_address_block_number_full_projection
41+
(
42+
SELECT
43+
*
44+
ORDER BY
45+
chain_id,
46+
address,
47+
block_number
48+
),
49+
PROJECTION chain_topic0_full_projection
4150
(
4251
SELECT
43-
_part_offset
52+
*
4453
ORDER BY
4554
chain_id,
4655
topic_0,
4756
block_number,
48-
transaction_index,
49-
log_index,
5057
address
5158
),
5259
PROJECTION address_topic0_state_projection

0 commit comments

Comments
 (0)