Skip to content
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

remove duplicated indexes #1508

Merged
merged 5 commits into from
Mar 4, 2019
Merged

remove duplicated indexes #1508

merged 5 commits into from
Mar 4, 2019

Conversation

ayrat555
Copy link
Contributor

@ayrat555 ayrat555 commented Mar 1, 2019

Motivation

PgHero found that we have 11 duplicated indexes

These indexes exist, but aren’t needed. Remove them for faster writes.

Details
--
On address_current_token_balancesaddress_current_token_balances_block_number_index (address_hash, block_number, token_contract_address_hash)is covered byaddress_current_token_balances_address_hash_block_number_token_ (address_hash, block_number, token_contract_address_hash)
On internal_transactionsinternal_transactions_to_address_hash_index (to_address_hash)is covered byinternal_transactions_to_address_hash_from_address_hash_created (to_address_hash, from_address_hash, created_contract_address_hash, type, index)
On internal_transactionsinternal_transactions_transaction_hash_index (transaction_hash)is covered byinternal_transactions_pkey (transaction_hash, index)
On logslogs_transaction_hash_index (transaction_hash)is covered bylogs_pkey (transaction_hash, index)
On token_transferstoken_transfers_from_address_hash_index (from_address_hash)is covered bytoken_transfers_from_address_hash_transaction_hash_index (from_address_hash, transaction_hash)
On token_transferstoken_transfers_to_address_hash_index (to_address_hash)is covered bytoken_transfers_to_address_hash_transaction_hash_index (to_address_hash, transaction_hash)
On token_transferstoken_transfers_transaction_hash_index (transaction_hash)is covered bytoken_transfers_pkey (transaction_hash, log_index)
On transaction_forkstransaction_forks_uncle_hash_index (uncle_hash)is covered bytransaction_forks_uncle_hash_index_index (uncle_hash, index)
On transactionstransactions_block_hash_index (block_hash)is covered bytransactions_block_hash_index_index (block_hash, index)
On transactionstransactions_created_contract_address_hash_index (created_contract_address_hash)is covered bytransactions_created_contract_address_hash_recent_collated_inde (created_contract_address_hash, block_number DESC, index DESC, hash)
On user_contactsuser_contacts_user_id_index (user_id)is covered byemail_unique_for_user (user_id, email)

Changelog

  • remove duplicated indexes

@ayrat555 ayrat555 requested review from vbaranov and zachdaniel March 1, 2019 10:17
@ghost ghost assigned ayrat555 Mar 1, 2019
@coveralls
Copy link

coveralls commented Mar 1, 2019

Pull Request Test Coverage Report for Build cc41f776-df2a-4229-9db2-cd9c496e2dc0

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 84.908%

Totals Coverage Status
Change from base Build 9e089ca9-9e2f-4da4-a428-5884dc9c15e4: 0.0%
Covered Lines: 4270
Relevant Lines: 5029

💛 - Coveralls

@ghost ghost assigned vbaranov Mar 1, 2019
@vbaranov
Copy link
Member

vbaranov commented Mar 4, 2019

@ayrat555 could you take a look why ci/circleci: test_parity_http_websocket tets failed in CI?

@ayrat555
Copy link
Contributor Author

ayrat555 commented Mar 4, 2019

@vbaranov it's a blinking test

@vbaranov vbaranov merged commit 9d203af into master Mar 4, 2019
@vbaranov vbaranov deleted the ab-remove-duplicated-indexes branch March 4, 2019 17:16
@ghost ghost removed the in progress label Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants