Skip to content

feat: Add event_id index on Core Data reading table#5190

Merged
judehung merged 1 commit intoedgexfoundry:mainfrom
weichou1229:issue-5176
Jun 23, 2025
Merged

feat: Add event_id index on Core Data reading table#5190
judehung merged 1 commit intoedgexfoundry:mainfrom
weichou1229:issue-5176

Conversation

@weichou1229
Copy link
Copy Markdown
Member

Add the event_id index on reading table to speed up the query.

Close #5176

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?) not impact
  • 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?) not impact

Testing Instructions

Deploy core service and device-virtaul to test the event API.

New Dependency Instructions (If applicable)

@weichou1229 weichou1229 requested a review from judehung June 23, 2025 02:59
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.74%. Comparing base (82c539f) to head (5e4d5c5).
⚠️ Report is 159 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5190      +/-   ##
==========================================
+ Coverage   26.69%   26.74%   +0.05%     
==========================================
  Files         278      278              
  Lines       19954    19993      +39     
==========================================
+ Hits         5326     5347      +21     
- Misses      13370    13387      +17     
- Partials     1258     1259       +1     

☔ 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.

-- SPDX-License-Identifier: Apache-2.0

ALTER TABLE core_data.device_info ADD COLUMN IF NOT EXISTS mark_deleted BOOLEAN DEFAULT false;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
-- create index on reading(event_id) to enhance the query performance

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added the comment.

Add the event_id index on reading table to speed up the query.

Close edgexfoundry#5176

Signed-off-by: bruce <weichou1229@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
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 92d5141 into edgexfoundry:main Jun 23, 2025
7 checks passed
@weichou1229 weichou1229 deleted the issue-5176 branch June 23, 2025 05:36
FelixTing pushed a commit to FelixTing/edgex-go that referenced this pull request Oct 15, 2025
Add the event_id index on reading table to speed up the query.

Close edgexfoundry#5176

Signed-off-by: bruce <weichou1229@gmail.com>
FelixTing pushed a commit to FelixTing/edgex-go that referenced this pull request Oct 15, 2025
Add the event_id index on reading table to speed up the query.

Close edgexfoundry#5176

Signed-off-by: Bruce Huang <weichou1229@gmail.com>
FelixTing pushed a commit to FelixTing/edgex-go that referenced this pull request Oct 15, 2025
Add the event_id index on reading table to speed up the query.

Close edgexfoundry#5176

Signed-off-by: Bruce Huang <weichou1229@gmail.com>
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 event_id index on Core Data reading table

3 participants