Skip to content

feat: Add indexes on reading.device_info_id and event.device_info_id#5334

Merged
judehung merged 1 commit intoedgexfoundry:mainfrom
FelixTing:issue-5333
Dec 22, 2025
Merged

feat: Add indexes on reading.device_info_id and event.device_info_id#5334
judehung merged 1 commit intoedgexfoundry:mainfrom
FelixTing:issue-5333

Conversation

@FelixTing
Copy link
Member

fix: #5333

Reading and event queries often join with the device_info table by device_info_id. Adding indexes on reading.device_info_id and event.device_info_id improves query performance.

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

New Dependency Instructions (If applicable)

Reading and event queries often join with the device_info table by device_info_id.
Adding indexes on reading.device_info_id and event.device_info_id improves query performance.

Signed-off-by: FelixTing <felix@iotechsys.com>
@FelixTing FelixTing requested a review from judehung December 22, 2025 06:49
@sonarqubecloud
Copy link

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.17%. Comparing base (dd9e956) to head (d87a39f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5334   +/-   ##
=======================================
  Coverage   21.17%   21.17%           
=======================================
  Files         285      285           
  Lines       20958    20958           
=======================================
  Hits         4438     4438           
  Misses      16167    16167           
  Partials      353      353           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@judehung judehung left a comment

Choose a reason for hiding this comment

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

LGTM

@judehung judehung merged commit 3b327d4 into edgexfoundry:main Dec 22, 2025
7 checks passed
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.

Add Indexes on reading.device_info_id and event.device_info_id

3 participants