BankingStageErrorsTrackingS.../migration.sql

39 lines
1.1 KiB
MySQL
Raw Normal View History

2023-10-02 01:51:38 -07:00
CREATE SCHEMA banking_stage_results;
CREATE TABLE banking_stage_results.transaction_infos (
signature CHAR(88) NOT NULL,
2023-10-16 06:53:44 -07:00
message text,
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,
prioritization_fees BIGINT,
utc_timestamp TIMESTAMP WITH TIME ZONE NOT NULL,
accounts_used text[]
2023-10-20 11:14:33 -07:00
processed_slot BIGINT,
2023-10-02 01:51:38 -07:00
);
CREATE TABLE banking_stage_results.blocks (
block_hash CHAR(44) NOT NULL,
slot BIGINT,
leader_identity CHAR(44),
successful_transactions BIGINT,
banking_stage_errors BIGINT,
processed_transactions BIGINT,
total_cu_used BIGINT,
total_cu_requested BIGINT,
heavily_writelocked_accounts text[]
);
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;
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;