-
Notifications
You must be signed in to change notification settings - Fork 157
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
Use the new is_deleted and last_updated columns from xx_LOGICAL_RESOURCES to eliminate joins #1385
Comments
I think what that means is that we would need IS_DELETED on both the RESOURCES and LOGICAL_RESOURCES tables. |
This flag was added under #1958, but work remains to actually use it. |
Now that we have #2014 I'm not sure if we still need this one. If so, how do they relate? |
Its not super clean, but I wanted to see if it was possible to get some isolated benefits from #1385 without needing to adopt the new query builder. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Ran the performance bucket against this code and all searches were processed. No odd behavior. Closing issue as the new code seems to be working. |
Is your feature request related to a problem? Please describe.
Searches always need to join to the _RESOURCES table to filter on the value for IS_DELETED. This flag represents the current state of the logical resource and so should be defined at the LOGICAL_RESOURCE level, not the RESOURCE (which represents a version of LOGICAL_RESOURCE.
Describe the solution you'd like
Investigate if it should be added to the global table rather than the resource-specific table.
Add the column to the logical resources table
Migrate data
Remove column from the resources tables
reorg
Update the search query generation as required, removing joins to the resources table unless they are required. The only reason to join with resources should be when the lastUpdated value is needed, and the final join to fetch the data blob.
Team discussion - added a comment that we have to consider VERSION specific status which is also on the RESOURCES table.
Describe alternatives you've considered
Status quo, and accept more expensive joins.
Additional context
N/A
Implementation Note
Trace specifications. To see search query timings:
To see search query SQL statements:
The text was updated successfully, but these errors were encountered: