X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0BCAE476265 for ; Mon, 24 Feb 2003 20:33:37 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 27298-03 for ; Mon, 24 Feb 2003 20:33:09 -0500 (EST) Received: from luckydigital.com (www.luckydigital.com [203.109.157.4]) by postgresql.org (Postfix) with ESMTP id 1DDF4476389 for ; Mon, 24 Feb 2003 17:38:58 -0500 (EST) Received: from jax (203-109-198-1.akl.ihugultra.co.nz [203.109.198.1]) by luckydigital.com (8.11.6/8.10.0) with SMTP id h1OMcxT08390 for ; Tue, 25 Feb 2003 11:38:59 +1300 Message-ID: <00cb01c2dc55$85b3d000$c900a8c0@jax> From: "James Cooper" To: "sql" Subject: indexing Date: Tue, 25 Feb 2003 11:38:59 +1300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00C8_01C2DCC2.7C7F2A30" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/538 X-Sequence-Number: 11936 This is a multi-part message in MIME format. ------=_NextPart_000_00C8_01C2DCC2.7C7F2A30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, I've been doing a little reading on indexing in prelude to indexing my db. I have the following to ask: if I had three tables for a many to many relationship say A, B, AND C B being the lookup. B being a huge 50k rows plus column and made just two f= origen keys(b.a_id,b.c_id). is it best to create two non-unique indexes or one unique index on both fie= lds? Please advise Ps=20 I also attempted creating an index on a table i have called person on perso= n_id and=20 ran=20 Explain=20 select person_id from person where person_id < n=20 but saw no results of my created index being used - am i doing something in= correctly Pps When indexing if searching tables is more important than concurrency - whic= h type of index is best? ------=_NextPart_000_00C8_01C2DCC2.7C7F2A30 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi all,
 
I've been doing a little reading on indexi= ng in=20 prelude to indexing my db.
I have the following to ask:
 
if I had three tables for a many to many= =20 relationship say A, B, AND C
B being the lookup. B being a huge 50k row= s plus=20 column and made just two forigen keys(b.a_id,b.c_id).
is it best to create two non-unique indexe= s or one=20 unique index on both fields?
 
 
Please advise
 
Ps
 
I also attempted creating an index on a ta= ble i=20 have called person on person_id and
ran
Explain
select person_id from person where person_= id < n=20
 
but saw no results of my created index bei= ng used -=20 am i doing something incorrectly
 
Pps
When indexing if searching tables is more = important=20 than concurrency - which type of index is=20 best?
------=_NextPart_000_00C8_01C2DCC2.7C7F2A30--