Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 037439FBCD9 for ; Mon, 29 Oct 2007 14:09:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 09893-07 for ; Mon, 29 Oct 2007 14:08:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 845EE9FBCE0 for ; Mon, 29 Oct 2007 14:08:45 -0300 (ADT) Received: from scratch (or-69-34-217-90.sta.embarqhsd.net [69.34.217.90]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l9TH8Xbx012151; Mon, 29 Oct 2007 10:08:34 -0700 Date: Mon, 29 Oct 2007 10:09:38 -0700 From: "Joshua D. Drake" To: Samantha Atkins Cc: pgsql-general@postgresql.org Subject: Re: A few questions Message-ID: <20071029100938.7f76b015@scratch> In-Reply-To: References: Organization: Joshua D. Drake X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.0; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/EVIUeHL6s8lmRejO/SlR9Az"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Virus-Scanned: ClamAV 0.91.1/4621/Mon Oct 29 03:25:54 2007 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Mon, 29 Oct 2007 10:08:34 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/1525 X-Sequence-Number: 122817 --Sig_/EVIUeHL6s8lmRejO/SlR9Az Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 29 Oct 2007 09:52:55 -0700 Samantha Atkins wrote: > First on prepared statements: >=20 > 1) If I am using the libpq are prepared statements tied to a =20 > connection?=20 Yes. > In other words can I prepare the statement once and use =20 > it on multiple connections? No. >=20 > 2) What is the logical scope of prepared statement names? Can I use =20 > the same name on different tables without conflict or is the scope =20 > 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...=20 >=20 > On indices: >=20 > 3) same as 2 for index names. I think they are per table but it is =20 > worth asking. Indexes are per relation (table) >=20 > and last: >=20 > 4) Is it generally better to have more tables in one database from a =20 > 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 =20 > situation where one app is used by multiple different users each =20 > 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. >=20 > - samantha Hope this was helpful. Sincerely, Joshua D. Drake >=20 >=20 > ---------------------------(end of > broadcast)--------------------------- TIP 5: don't forget to increase > your free space map settings >=20 --=20 =3D=3D=3D The PostgreSQL Company: Command Prompt, Inc. =3D=3D=3D 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/ --Sig_/EVIUeHL6s8lmRejO/SlR9Az Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHJhPSATb/zqfZUUQRAjNcAJ99HJds483Dc0+H951+VStvRBfghgCfSzDT 8ppGwiN5C8SKLxFN5bPwRZ0= =KHvV -----END PGP SIGNATURE----- --Sig_/EVIUeHL6s8lmRejO/SlR9Az--