8000 Index blocks.hash by nymkappa · Pull Request #1673 · mempool/mempool · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Index blocks.hash #1673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2022
Merged

Index blocks.hash #1673

merged 1 commit into from
May 19, 2022

Conversation

nymkappa
Copy link
Member

Database migration upgraded to 18

@nymkappa nymkappa requested a review from wiz May 19, 2022 10:14
@cla-bot cla-bot bot added the cla-signed label May 19, 2022
Copy link
Member
@wiz wiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ACK @ 04bc41d

Before

% time curl -i http://127.0.0.1:8999/api/v1/block/000000009b7262315dbf071787ad3656097b892abffd1f95a1a022f896f533fc
HTTP/1.1 200 OK
...
curl -i   0.01s user 0.00s system 0% cpu 3.736 total

Migration

May 19 10:29:26 [12234] INFO: Database connection established.
May 19 10:29:26 [12234] DEBUG: MIGRATIONS: Running migrations
May 19 10:29:26 [12234] DEBUG: MIGRATIONS: Database engine version '10.5.15-MariaDB'
May 19 10:29:26 [12234] DEBUG: MIGRATIONS: Current state.schema_version 17
May 19 10:29:26 [12234] DEBUG: MIGRATIONS: Latest DatabaseMigration.version is 18
May 19 10:29:26 [12234] DEBUG: MIGRATIONS: Execute query:
ALTER TABLE `blocks` ADD INDEX `hash` (`hash`);
May 19 10:29:30 [12234] NOTICE: MIGRATIONS: Upgrading database schema
May 19 10:29:30 [12234] DEBUG: MIGRATIONS: Execute query:
START TRANSACTION;
May 19 10:29:30 [12234] DEBUG: MIGRATIONS: Execute query:
UPDATE state SET number = 18 WHERE name = 'schema_version';
May 19 10:29:30 [12234] DEBUG: MIGRATIONS: Execute query:
COMMIT;
May 19 10:29:30 [12234] NOTICE: MIGRATIONS: OK. Database schema have been migrated from version 17 to 18 (latest version)

After

% time curl -i http://127.0.0.1:8999/api/v1/block/000000009b7262315dbf071787ad3656097b892abffd1f95a1a022f896f533fc
HTTP/1.1 200 OK
...
curl -i   0.01s user 0.00s system 53% cpu 0.013 total

@wiz wiz merged commit 63890a6 into master May 19, 2022
@wiz wiz deleted the nymkappa/feature/index-block-hash branch May 19, 2022 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0