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

Create a catalog of fields in use in rules to suggest covered indexes and reduce fetch from database. #20

Closed
richard-churchman opened this issue Nov 30, 2023 · 1 comment
Assignees
Labels
wontfix This will not be worked on

Comments

@richard-churchman
Copy link
Contributor

Oftentimes the amount of data being used in rules is a small subset of the data that is presented. It follows that forcing the database to go out to Page and Tuple is quite expensive, especially when the index is likely in the buffer cache.

It is not currently possible to see the fields in use by rules that depend on cache data.

Create a function in model sync that will examine the Request XPath elements in existence in rules and create a catalogue of fields in use.

With the catalogue, only select data back from the database that is required in the rules. Limiting the select statement has a big impact on query performance and jsonb field parsing.

Optionally, build - or at a minimum suggest - indexes which cover the fields to avoid the need to go to Page and Tuple.

@richard-churchman
Copy link
Contributor Author

This won't be implemented as while this functionality does now look at rules to find keys in use to reduce select over wire, covered indies on JSONB are not supported. The strategy is to move the cache to Redis in any event and only bug fixes and streamlining of existing functionality will be implemented where PostgreSQL as cache.

@richard-churchman richard-churchman added the wontfix This will not be worked on label Apr 21, 2024
@richard-churchman richard-churchman self-assigned this Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant