2023-10-02 01:51:38 -07:00
|
|
|
CREATE SCHEMA banking_stage_results;
|
|
|
|
|
|
|
|
CREATE TABLE banking_stage_results.transaction_infos (
|
2023-10-21 09:40:19 -07:00
|
|
|
signature CHAR(88) PRIMARY KEY,
|
2023-11-23 07:22:38 -08:00
|
|
|
errors text,
|
2023-10-02 01:51:38 -07:00
|
|
|
is_executed BOOL,
|
|
|
|
is_confirmed BOOL,
|
|
|
|
first_notification_slot BIGINT NOT NULL,
|
|
|
|
cu_requested BIGINT,
|
2023-10-17 03:11:54 -07:00
|
|
|
prioritization_fees BIGINT,
|
2023-10-17 06:13:42 -07:00
|
|
|
utc_timestamp TIMESTAMP WITH TIME ZONE NOT NULL,
|
2023-11-24 04:39:48 -08:00
|
|
|
accounts_used text,
|
2023-10-21 09:40:19 -07:00
|
|
|
processed_slot BIGINT
|
2023-10-02 01:51:38 -07:00
|
|
|
);
|
2023-10-17 03:11:54 -07:00
|
|
|
|
|
|
|
CREATE TABLE banking_stage_results.blocks (
|
2023-10-21 09:40:19 -07:00
|
|
|
block_hash CHAR(44) PRIMARY KEY,
|
2023-10-17 03:11:54 -07:00
|
|
|
slot BIGINT,
|
|
|
|
leader_identity CHAR(44),
|
|
|
|
successful_transactions BIGINT,
|
|
|
|
banking_stage_errors BIGINT,
|
|
|
|
processed_transactions BIGINT,
|
|
|
|
total_cu_used BIGINT,
|
|
|
|
total_cu_requested BIGINT,
|
2023-11-24 02:41:19 -08:00
|
|
|
heavily_writelocked_accounts text,
|
2023-11-23 07:22:38 -08:00
|
|
|
heavily_readlocked_accounts text
|
2023-10-21 09:40:19 -07:00
|
|
|
);
|
|
|
|
|
2023-10-18 03:44:11 -07:00
|
|
|
CREATE INDEX idx_blocks_slot ON banking_stage_results.blocks(slot);
|
|
|
|
-- optional
|
|
|
|
CLUSTER banking_stage_results.blocks using idx_blocks_slot;
|
|
|
|
VACUUM FULL banking_stage_results.blocks;
|
2023-10-21 01:56:14 -07:00
|
|
|
CREATE INDEX idx_blocks_slot_errors ON banking_stage_results.blocks(slot) WHERE banking_stage_errors > 0;
|
2023-10-18 03:44:11 -07:00
|
|
|
|
|
|
|
CREATE INDEX idx_transaction_infos_timestamp ON banking_stage_results.transaction_infos(utc_timestamp);
|
|
|
|
-- optional
|
|
|
|
CLUSTER banking_stage_results.transaction_infos using idx_transaction_infos_timestamp;
|
|
|
|
VACUUM FULL banking_stage_results.transaction_infos;
|
2023-10-21 01:56:14 -07:00
|
|
|
|