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

Slowness in simple queries #1134

Open
mauricioribeiro opened this issue Apr 26, 2024 · 0 comments
Open

Slowness in simple queries #1134

mauricioribeiro opened this issue Apr 26, 2024 · 0 comments
Assignees
Labels
api: spanner Issues related to the googleapis/python-spanner API.

Comments

@mauricioribeiro
Copy link

Hi everyone,

I'm getting slow responses (30-100ms for simple select queries) from Spanner in my FastAPI app. In order to confirm the latency is not an issue, I deployed a Postgres instance (Enterprise Edition, 4 vCPUs 26 GB MEM) in the same location (europe-west1 Belgium) as the Spanner (2 nodes) and tested/profiled both in my local app. Here is the comparison:

Postgres (6ms/10 profiles avg):

image

Spanner (28ms/9 profiles avg):

image

I can confirm the Spanner query is executed in less than 1ms:

image

Bottleneck seems to happen in the execute() function, from what I understood analysing the Google Profiling comparison.

Also got similar slowness with the tutorial case.

Could someone please help me on this? Have anyone already experienced something similar?

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner API. label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner API.
Projects
None yet
Development

No branches or pull requests

2 participants