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
{{ message }}
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
i'm making some parallel requests (local db), let's say 3/4 request to the same table, very basic query:
4x of select * from user where id = $1
running in parallel with Promise.all()
when i make the first 4 parallel requests i see a completion time of around 60ms.
calling again the code, it's much faster, ~5ms.
if i wait ~10 second, and call again the code is see again the 60ms delay,
like if the pg client needs to connect to the db, and after a shot timeout, it disconnects.
i'm using the library as it's the same as the pg javascript client (so i can switch to the native and back with easy).
no special settings, only the stuff for connecting to the database.
using the pg javascript library i only see a first delay of around ~9 - 11 ms.
if i use the pg-native client without running parallel request i don't see the huge delay of 60ms, just ~7ms.
it's probably connected somehow to pools and timeouts, any way to improve those first query?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
i'm making some parallel requests (local db), let's say 3/4 request to the same table, very basic query:
4x of
select * from user where id = $1
running in parallel with Promise.all()
when i make the first 4 parallel requests i see a completion time of around 60ms.
calling again the code, it's much faster, ~5ms.
if i wait ~10 second, and call again the code is see again the 60ms delay,
like if the pg client needs to connect to the db, and after a shot timeout, it disconnects.
i'm using the library as it's the same as the pg javascript client (so i can switch to the native and back with easy).
no special settings, only the stuff for connecting to the database.
using the pg javascript library i only see a first delay of around ~9 - 11 ms.
if i use the pg-native client without running parallel request i don't see the huge delay of 60ms, just ~7ms.
it's probably connected somehow to pools and timeouts, any way to improve those first query?
The text was updated successfully, but these errors were encountered: