You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using FastAPI and connecting to cockroachdb (which I am using the free plan) and my request from the API anytime I query the cockroachdb is extremely slow. My cluster is running on us-west-2 and I am located in California. I don't have the FastAPI deployed anywhere and just running it locally on my laptop which is framework laptop running ubuntu 24.04.
I also believe I have a lot of data for my queries to be this slow that some of my endpoints take about ~20s to get a response.
When I connect to a local postgreql on my machine, my requests take ~2s.
I think this is a huge difference and want to know if I am doing something wrong in how I am connecting to cockroachdb, or is this due to it being the free plan?
This is how I connecting to the database in my code
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am using FastAPI and connecting to cockroachdb (which I am using the free plan) and my request from the API anytime I query the cockroachdb is extremely slow. My cluster is running on
us-west-2
and I am located in California. I don't have the FastAPI deployed anywhere and just running it locally on my laptop which is framework laptop running ubuntu 24.04.I also believe I have a lot of data for my queries to be this slow that some of my endpoints take about ~20s to get a response.
When I connect to a local postgreql on my machine, my requests take ~2s.
I think this is a huge difference and want to know if I am doing something wrong in how I am connecting to cockroachdb, or is this due to it being the free plan?
This is how I connecting to the database in my code
Any help or guidance is greatly appreciated here.
Beta Was this translation helpful? Give feedback.
All reactions