Closed YuXiaoCoder closed 2 years ago
that gateway_last_block migration takes a very long time without a key index that can be added as follows:
alter table transaction_actors drop constraint transaction_actors_pkey;
alter table transaction_actors add constraint transaction_actors_pkey primary key (actor, block, transaction_hash, actor_role);
If you have any questions please join us in Discord in the blockchain-development channel
I downloaded the May 8th snapshot from DeWi ETL and it imported successfully after 30 hours, I thought the software version and SQL were a one-to-one match, so I ran
/opt /etl/bin/blockchain_etl migrations run
to migrate, but the program is stuck in the application/opt/etlmigrations/1650926462-gateway_last_block.sql
, according to the timestamp, this SQL should be April 26, and should not be executed again.I observed it through
/opt/etl/bin/blockchain_etl migrations list
command:By looking at the SQL content, I found that it takes 40 minutes to execute
SELECT MAX(block) FROM transaction_actors, gateway_inventory where actor = gateway_inventory.address;
once, and it needs to be executed 717120 times, which is too long to wait, so I I tried to start the service directly, but the service startup reported an error, the log is as follows: