Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

The method SimpleSpannerRepository#existsById fetches all fields and interleaved child objects #2127

Closed
s13o opened this issue Jan 18, 2020 · 4 comments · Fixed by #2136
Closed
Assignees
Labels

Comments

@s13o
Copy link
Contributor

s13o commented Jan 18, 2020

The method SimpleSpannerRepository#existsById could be implemented by a simple query like SELECT EXISTS (SELECT 1 FROM %s WHERE %s) instead of fetching of too many fields and interleaved objects from the database.

@dmitry-s
Copy link
Contributor

@s13o I'm working on this issue

@s13o
Copy link
Contributor Author

s13o commented Jan 24, 2020

I'm too. I did as You recommend
pls take a look on #2135

@dmitry-s
Copy link
Contributor

@s13o I decided to take a different approach. I'm using a read call, as it was done originally; but instead of retrieving all the fields, I only fetch one.
I understand that you put a lot of work in #2135, but I thought you were not going to work on that PR when you closed it.

Going forward we will coordinate our efforts!

@s13o
Copy link
Contributor Author

s13o commented Jan 24, 2020

well, I did a force-push for a batter commit history and it closed the PR
Basically I'd planned to resolve the #2127 and then #2132 because I thought they depend on each other in a part of the building of sql-where for KeySet.
So, will see after the merge - probably I'll be able to suggest some improvements

dmitry-s added a commit that referenced this issue Jan 28, 2020
* retrieve only one key field for existById; fixes #2127
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

3 participants