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

Add a flag for splitting FIND_ITEMS into multiple queries #118

Open
pjenvey opened this issue May 9, 2019 · 0 comments · May be fixed by #119
Open

Add a flag for splitting FIND_ITEMS into multiple queries #118

pjenvey opened this issue May 9, 2019 · 0 comments · May be fixed by #119
Assignees
Labels
5 Estimate - l - Moderately complex, will require some effort but clearly defined. spanner
Milestone

Comments

@pjenvey
Copy link
Member

pjenvey commented May 9, 2019

Under stess testing the LastModified secondary index produces slower FIND_ITEMS results w/ higher Spanner CPU usage than not using it at all, specifically on larger result sets generated by the load tester.

FIND_ITEMS implicitly joins the index against the BSO table (to load columns not included in the index). Spanner's query planner produces a Cross Apply w/ an Input of the results of the index query and a Map on the bso table. Each Map produces an individual "execution" and each execution completes rather quickly, but on larger result sets begins to add up.

Screen Shot 2019-04-04 at 2 30 04 PM

We can avoid all the individual executions by doing the index query first and passing its results to a separate query to load the other columns.

Let's add a flag to test this under load.

We should expect this secondary index to work more efficiently on typical FIND_ITEMS work loads producing a smaller number of results. The goal here is to utilize it for this sake while still producing reasonable response times/cpu usage with larger results as well.

@pjenvey pjenvey added the spanner label May 9, 2019
@pjenvey pjenvey self-assigned this May 9, 2019
@pjenvey pjenvey added this to the 2019-05-31 milestone May 9, 2019
pjenvey added a commit that referenced this issue May 14, 2019
via _bsolm_index_separate = true

Closes #118
pjenvey added a commit that referenced this issue May 14, 2019
via _bsolm_index_separate = true

Closes #118
pjenvey added a commit that referenced this issue May 15, 2019
via _bsolm_index_separate = true

Closes #118
@pjenvey pjenvey linked a pull request May 15, 2019 that will close this issue
@tublitzed tublitzed added the 5 Estimate - l - Moderately complex, will require some effort but clearly defined. label Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 Estimate - l - Moderately complex, will require some effort but clearly defined. spanner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants