pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Phil McGuinness <sherlock@sherlock.com.au>
Cc: pgsql-bugs@postgresql.org
Subject: Re: PostGres 9.5 [ and earlier ] "SET SEARCH_PATH TO "+ cSchema + ";"
Date: Thu, 30 Jun 2016 10:09:11 -0400
Message-ID: <19688.1467295751@sss.pgh.pa.us> (raw)
In-Reply-To: <000001d1d2c2$e1fede00$a5fc9a00$@sherlock.com.au>
References: <000001d1d2c2$e1fede00$a5fc9a00$@sherlock.com.au>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

"Phil McGuinness" <sherlock@sherlock.com.au> writes:
> We used  "SET SEARCH_PATH TO "+ cSchema + ";"  to set say SHER2016 or
> SHERDATA.. where ever we need to be and open tables as normal.
>  "INSERT INTO settings SELECT * FROM settings;")      //  We can use this
> syntax rather explicit  say sherdata.
> .. Verse ..
>   "INSERT INTO settings SELECT * FROM sherdata.settings;")      

> When we use code with SET SEARCH PATH and not explicit schema the speed
> difference is 8 time slower.

This is really hard to believe, and you have not provided sufficient
detail to let someone else reproduce it.

A possible guess, though, comes from the fact that the default value of
search_path is *not* empty; it is

# show search_path ;
   search_path   
-----------------
 "$user", public
(1 row)

If you are doing exactly what you show above, then you removed "public"
from your search path, as well as the schema corresponding to your user
name (if there is one).  I wonder whether the "sherdata" schema contains
a different and slower version of some function or view than exists in
"public".

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (3+ messages)  latest in thread

Message-ID: <19688.1467295751@sss.pgh.pa.us>
Permalink:  ../19688.1467295751@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19688.1467295751@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sherlock@sherlock.com.au
  Subject: Re: PostGres 9.5 [ and earlier ] "SET SEARCH_PATH TO "+ cSchema + ";"
  In-Reply-To: <19688.1467295751@sss.pgh.pa.us>
  References: <000001d1d2c2$e1fede00$a5fc9a00$@sherlock.com.au> <19688.1467295751@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox