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

Improve Performance of Contracts REST API Endpoints with High Entity Count #10434

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

HarshSawarkar
Copy link
Contributor

Description:

The entity__id_type index is replaced with entity_type_id.

Related issue(s):

Fixes #9967

jnels124
jnels124 previously approved these changes Feb 19, 2025
Copy link
Contributor

@jnels124 jnels124 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

see 8 files with indirect coverage changes

@HarshSawarkar
Copy link
Contributor Author

@jnels124 What are these Codacy errors, and how can I fix them?

[Check failure on line 1 in hedera-mirror-importer/src/main/resources/db/migration/v2/V2.9.0__drop_entity__id_type_index.sql](https://github.com/hiero-ledger/hiero-mirror-node/pull/10434/files#annotation_32132194835) 

@codacy-production
codacy-production
/ Codacy Static Code Analysis
hedera-mirror-importer/src/main/resources/db/migration/v2/V2.9.0__drop_entity__id_type_index.sql#L1

Expected SET ANSI_NULLS ON near top of file
 [Check failure on line 1 in hedera-mirror-importer/src/main/resources/db/migration/v2/V2.9.0__drop_entity__id_type_index.sql](https://github.com/hiero-ledger/hiero-mirror-node/pull/10434/files#annotation_32132194838) 

@codacy-production
codacy-production
/ Codacy Static Code Analysis
hedera-mirror-importer/src/main/resources/db/migration/v2/V2.9.0__drop_entity__id_type_index.sql#L1

Expected SET NOCOUNT ON near top of file
 [Check failure on line 1 in hedera-mirror-importer/src/main/resources/db/migration/v2/V2.9.0__drop_entity__id_type_index.sql](https://github.com/hiero-ledger/hiero-mirror-node/pull/10434/files#annotation_32132194842) 

@codacy-production
codacy-production
/ Codacy Static Code Analysis
hedera-mirror-importer/src/main/resources/db/migration/v2/V2.9.0__drop_entity__id_type_index.sql#L1

Expected SET QUOTED_IDENTIFIER ON near top of file
 [Check failure on line 1 in hedera-mirror-importer/src/main/resources/db/migration/v2/V2.9.0__drop_entity__id_type_index.sql](https://github.com/hiero-ledger/hiero-mirror-node/pull/10434/files#annotation_32132194845) 

@codacy-production
codacy-production
/ Codacy Static Code Analysis
hedera-mirror-importer/src/main/resources/db/migration/v2/V2.9.0__drop_entity__id_type_index.sql#L1

Expected SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED near top of file

@steven-sheehy steven-sheehy changed the title chore-Improve Performance of Contracts REST API Endpoints with High Entity Count Improve Performance of Contracts REST API Endpoints with High Entity Count Feb 20, 2025
@jnels124
Copy link
Contributor

@HarshSawarkar let me investigate those and will get back to you.

@jnels124
Copy link
Contributor

@HarshSawarkar We will get this in but first can you change the sql files to use lowercase for the sql keywords? Thanks.

 into chore-Improve-Performance-of-Contracts-REST-API-Endpoints
@HarshSawarkar
Copy link
Contributor Author

@HarshSawarkar We will get this in but first can you change the sql files to use lowercase for the sql keywords? Thanks.

Updated

Signed-off-by: Harsh Sawarkar <[email protected]>
Copy link
Contributor

@steven-sheehy steven-sheehy left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type: Something isn't working performance rest Area: REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some contracts REST API endpoints show large slowdown with high number of entities
3 participants