The cost of SET search_path TO

Started by Oluwatope Akinniyiover 20 years ago2 messagesgeneral
Jump to latest
#1Oluwatope Akinniyi
tope.akinniyi@shepherdhill.biz

Hi,

I will appreciate it if anyone can educate me on the cost of using SET
search_path TO for schemas at runtime. In particular, for .NET data
operations where there may be high rate of connection/disconnection and
reconnection for initial data fetching and subsequent updating.

Best regards

Tope Akinniyi
ShepherdHill Software
Lagos

#2Magnus Hagander
magnus@hagander.net
In reply to: Oluwatope Akinniyi (#1)
Re: The cost of SET search_path TO

Hi,

I will appreciate it if anyone can educate me on the cost of
using SET search_path TO for schemas at runtime.

AFAIK, that's quite cheap. Shouldn't be a problem.

In
particular, for .NET data operations where there may be high
rate of connection/disconnection and reconnection for initial
data fetching and subsequent updating.

You should be using connection pooling for this. I beleive npgsql
supports it just fine. That'll make a *lot* of difference on performance
in this kind of scenario.

//Magnus