From: Joshua D. Drake <jd@commandprompt.com>
To: Samantha Atkins <sjatkins@mac.com>
Cc: pgsql-general@postgresql.org
Subject: Re: A few questions
Date: Mon, 29 Oct 2007 10:09:38 -0700
Message-ID: <20071029100938.7f76b015@scratch> (raw)
In-Reply-To: <D32C7D7E-6706-42A4-B957-A4019BF1FA35@mac.com>
References: <D32C7D7E-6706-42A4-B957-A4019BF1FA35@mac.com>
On Mon, 29 Oct 2007 09:52:55 -0700
Samantha Atkins <sjatkins@mac.com> wrote:
> First on prepared statements:
>
> 1) If I am using the libpq are prepared statements tied to a
> connection?
Yes.
> In other words can I prepare the statement once and use
> it on multiple connections?
No.
>
> 2) What is the logical scope of prepared statement names? Can I use
> the same name on different tables without conflict or is the scope
> database wide or something else?
Each prepare must be unique within the session. So session 1 can have
foo and session 2 can have foo, but session 1 can not have foo that
calls to two different objects...
>
> On indices:
>
> 3) same as 2 for index names. I think they are per table but it is
> worth asking.
Indexes are per relation (table)
>
> and last:
>
> 4) Is it generally better to have more tables in one database from a
> memory and performance point of view or divide into more databases
> if there is a logical division.
Uhmm this is more of a normalization and relation theory question :). I
> The reason I ask is that I have a
> situation where one app is used by multiple different users each
> running their own copy.
Ahh... use namespaces/schemas:
http://www.postgresql.org/docs/current/static/ddl-schemas.html> Thanks very much for any enlightenment on these questions.
>
> - samantha
Hope this was helpful.
Sincerely,
Joshua D. Drake
>
>
> ---------------------------(end of
> broadcast)--------------------------- TIP 5: don't forget to increase
> your free space map settings
>
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997 http://www.commandprompt.com/
UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/Attachments:
[application/pgp-signature] signature.asc (188B, ../20071029100938.7f76b015@scratch/2-signature.asc)
download
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 using the --to and --cc options:
reply via email
To: pgsql-general@postgresql.org
Cc: jd@commandprompt.com, sjatkins@mac.com
Subject: Re: A few questions
In-Reply-To: <20071029100938.7f76b015@scratch>
* 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