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

feat(jdbc-postgres): improve JDBC PostgreSQL queues queries performance #1883

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

loicmathieu
Copy link
Member

close #1121

These new indices has been tested on a table with 2.6 millions records in it.
The poll query goes from 1s to 1ms (on idle instance).
The execution of a DBT flow goes from 55s to 30s, of course this is just an example.

I think the previous indices didn't works because they didn't have the offset column, as all poll queries sort by offset or filter by offset; not having the offset column lead to the optimizer choosing a different index or no indices at all.
The new indices will take more space so I made them partial as they are only used when the consumer_* column is false.

@loicmathieu loicmathieu force-pushed the feat/postgres-queues-indexes branch from 459443b to 2ff0372 Compare August 14, 2023 12:17
@loicmathieu loicmathieu requested a review from tchiotludo August 14, 2023 15:08
@loicmathieu loicmathieu force-pushed the feat/postgres-queues-indexes branch from 2ff0372 to ae6e26d Compare August 16, 2023 07:05
@tchiotludo tchiotludo merged commit a6b28d6 into develop Aug 17, 2023
@tchiotludo tchiotludo deleted the feat/postgres-queues-indexes branch August 17, 2023 17:59
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.

Improve PostgreSQL JDBC queue poll performance
2 participants