-
Notifications
You must be signed in to change notification settings - Fork 107
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
fix: deactivate bns table indices before subdomain import #1086
Conversation
Codecov Report
@@ Coverage Diff @@
## beta #1086 +/- ##
==========================================
- Coverage 72.82% 72.81% -0.01%
==========================================
Files 90 90
Lines 9813 9811 -2
Branches 1907 1907
==========================================
- Hits 7146 7144 -2
Misses 2553 2553
Partials 114 114
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat postgres feature!
🎉 This PR is included in version 3.0.0-beta.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [3.0.0](v2.1.1...v3.0.0) (2022-03-03) ### Bug Fixes * capture re-organized txs correctly in `/extended/v1/:address/transactions` ([#1074](#1074)) ([81d039d](81d039d)) * deactivate indices before subdomain import ([#1086](#1086)) ([d8d4d4c](d8d4d4c)) * index principal_stx_txs tx_id to speed up reorg updates ([#1080](#1080)) ([f6d7d0c](f6d7d0c)) * principal_stx_txs sorting ([#1056](#1056)) ([b0a0e94](b0a0e94)) * remove unused indices, add others for re-org queries ([#1087](#1087)) ([2a2fb8d](2a2fb8d)) * sort NFT events by event_index too ([#1063](#1063)) ([77b2587](77b2587)) * chore!: major version bump for breaking db schema changes ([296c619](296c619)) ### Features * add `chain_tip` materialized view to track chain tip stats ([#1028](#1028)) ([803ac18](803ac18)) * add chain tip info to `/extended/v1/status` ([#1070](#1070)) ([fb573b1](fb573b1)) * added feature for rendering docs ([#991](#991)) ([a521a39](a521a39)) * change string and hex column indices to Hash method ([#1042](#1042)) ([aae6cc0](aae6cc0)) ### BREAKING CHANGES * use event-replay to upgrade, this version includes breaking changes to the db sql schema
🎉 This PR is included in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This patch temporarily disables indices on the
subdomains
,zonefiles
,namespaces
, andnames
tables before subdomain import, and also removes unused indices from these tables.From postgres docs on populating a database:
Instead of dropping and re-creating, this code just disables and reindexes them after import is complete via the use of the
indisready
andindisvalid
index state flags.On local tests, it now takes ~2 seconds to import 10,000 subdomains when before this change it took ~30 seconds per 10,000.
Fixes #1081