D
D
Daulet Nurzhanov2018-04-24 09:50:30
PostgreSQL
Daulet Nurzhanov, 2018-04-24 09:50:30

Difference between Pool and Client in PostgreSQL?

I started studying backend and appeared in the way of accessing the database. What is the difference between Pool and Client in node-postgres?
What is the best place to use?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
RidgeA, 2018-04-24
@RidgeA

Client - one connection to the database.
Pool - several Client
Pool allows you to make several (independent of each other) requests in parallel. If at least some competitive load comes to the service, then it is better to use it.

F
Fixid, 2018-04-24
@Fixid

I will add RidgeA that in the pool you can permanently open several connections and reuse them instead of closing them. Then you do not need to spend money on connection

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question