Skip to content

fix: change order query conditions#2422

Closed
migmartri wants to merge 1 commit into
chainloop-dev:mainfrom
migmartri:change-sorting
Closed

fix: change order query conditions#2422
migmartri wants to merge 1 commit into
chainloop-dev:mainfrom
migmartri:change-sorting

Conversation

@migmartri

Copy link
Copy Markdown
Member

Changing order so the DB index work as expected

Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
@migmartri migmartri requested review from javirln and jiparis September 8, 2025 15:33
@jiparis

jiparis commented Sep 8, 2025

Copy link
Copy Markdown
Member

Please check #2423 for the fix.

@migmartri

Copy link
Copy Markdown
Member Author

not needed. The order of the conditions doesn't make a difference

@migmartri migmartri closed this Sep 8, 2025
@javirln

javirln commented Sep 9, 2025

Copy link
Copy Markdown
Member

I had it understood that the order matter on indexes: https://neon.com/postgresql/postgresql-indexes/postgresql-multicolumn-indexes

@migmartri

Copy link
Copy Markdown
Member Author

I had it understood that the order matter on indexes: https://neon.com/postgresql/postgresql-indexes/postgresql-multicolumn-indexes

That's correct, the order in the indexes matter, but not in the queries, which is what I changed

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.

3 participants