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

create suggested indexes #2518

Merged
merged 3 commits into from
Aug 19, 2019
Merged

create suggested indexes #2518

merged 3 commits into from
Aug 19, 2019

Conversation

ayrat555
Copy link
Contributor

@ayrat555 ayrat555 commented Aug 7, 2019

Motivation

Pg Here suggest creating a couple of the following indexes

Total Time | Average Time | Calls
-- | -- | --
452 min  | 48 ms | 568,394

DELETE FROM "address_token_balances" AS a0 USING (SELECT a0."address_hash" AS "address_hash", a0."token_contract_address_hash" AS "token_contract_address_hash", a0."block_number" AS "block_number" FROM "address_token_balances" AS a0 WHERE (a0."block_number" = ANY($1)) ORDER BY a0."address_hash", a0."token_contract_address_hash", a0."block_number" FOR UPDATE) AS s1 WHERE (((s1."address_hash" = a0."address_hash") AND (s1."token_contract_address_hash" = a0."token_contract_address_hash")) AND (s1."block_number" = a0."block_number")) RETURNING a0."address_hash", a0."token_contract_address_hash", a0."block_number"


Total Time | Average Time | Calls
-- | -- | --
19,563 min  | 1,417 ms | 828,329poa
SELECT b0."address_type", b0."reward", b0."address_hash", b0."block_hash", b0."inserted_at", b0."updated_at", b0."block_hash" FROM "block_rewards" AS b0 WHERE (b0."block_hash" = $1) ORDER BY b0."block_hash"

Changelog

  • create suggested indexes

@coveralls
Copy link

Pull Request Test Coverage Report for Build 8a72ca6d-7d7f-4043-82b2-bdf79e1638a4

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 79.383%

Totals Coverage Status
Change from base Build 966493d9-43a2-49bc-be70-770c5be1b661: 0.09%
Covered Lines: 5171
Relevant Lines: 6514

💛 - Coveralls

@vbaranov vbaranov merged commit e9d7b7c into master Aug 19, 2019
@vbaranov vbaranov deleted the ab-create-suggested-indexes branch August 19, 2019 18:43
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.

5 participants