Skip to content

Add composite indexes to events table to improve query performance#4982

Merged
sethboyles merged 1 commit intocloudfoundry:mainfrom
joyvuu-dave:add-indexes-to-improve-performance
Apr 6, 2026
Merged

Add composite indexes to events table to improve query performance#4982
sethboyles merged 1 commit intocloudfoundry:mainfrom
joyvuu-dave:add-indexes-to-improve-performance

Conversation

@joyvuu-dave
Copy link
Copy Markdown
Contributor

@joyvuu-dave joyvuu-dave commented Mar 30, 2026

We observed that certain queries were taking 30+ seconds on a large, production foundation. After exploring what was happening, we managed to cut query time down to sub-millisecond by adding a few composite indexes.

A technical deep dive and a set of benchmark tests can be found here.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

We observed that certain queries were taking 30+ seconds on a large, production foundation. After exploring what was happening, we managed to cut query time down to sub-millisecond by adding a few composite indexes.
@sethboyles sethboyles merged commit b27da11 into cloudfoundry:main Apr 6, 2026
20 of 21 checks passed
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Apr 6, 2026
Changes in cloud_controller_ng:

- Add composite indexes to events table to improve query performance
    PR: cloudfoundry/cloud_controller_ng#4982
    Author: Dave Riddle <david.riddle@broadcom.com>

- Fail tasks stuck in PENDING
    PR: cloudfoundry/cloud_controller_ng#4983
    Author: Seth Boyles <seth.boyles@broadcom.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.

2 participants