Skip to content

Conversation

@rafaelcr
Copy link
Collaborator

Optimizes query for /extended/v2/blocks/${blockHash}/transactions by first looking for the index_block_hash of the relevant block in the blocks table and then using that value in other filters, instead of looking for the block in the txs table.

Reduces query time by 99%.

@github-actions
Copy link

github-actions bot commented Apr 18, 2025

Vercel deployment URL: https://stacks-blockchain-3om1hq4k1-hirosystems.vercel.app 🚀

@codecov
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@rafaelcr rafaelcr requested a review from CharlieC3 April 18, 2025 16:21
Copy link
Contributor

@CharlieC3 CharlieC3 left a comment

Choose a reason for hiding this comment

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

:shipit:

@rafaelcr rafaelcr merged commit e69f9e4 into develop Apr 18, 2025
24 of 26 checks passed
@rafaelcr rafaelcr deleted the fix/block-transactions-optim branch April 18, 2025 17:04
hirosystems-release-bot bot added a commit that referenced this pull request Apr 18, 2025
## [8.10.0](v8.9.0...v8.10.0) (2025-04-18)

### Features

* add `Warning` http response deprecation notices ([#2253](#2253)) ([e62ce79](e62ce79))

### Bug Fixes

* optimize contract event list db index ([#2258](#2258)) ([e1044d1](e1044d1))
* optimize query for transactions in block ([#2259](#2259)) ([e69f9e4](e69f9e4))
@hirosystems-release-bot
Copy link
Contributor

🎉 This PR is included in version 8.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants