X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 749A24763C5 for ; Mon, 24 Feb 2003 18:29:14 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 01397-03 for ; Mon, 24 Feb 2003 18:28:46 -0500 (EST) Received: from luckydigital.com (www.luckydigital.com [203.109.157.4]) by postgresql.org (Postfix) with ESMTP id 9991C476067 for ; Mon, 24 Feb 2003 16:06:22 -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 h1OL6MT02636 for ; Tue, 25 Feb 2003 10:06:22 +1300 Message-ID: <006a01c2dc48$94d665f0$c900a8c0@jax> From: "James Cooper" To: "sql" Subject: indexing Date: Tue, 25 Feb 2003 09:38:28 +1300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_005F_01C2DCB1.A709E1C0" 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/536 X-Sequence-Number: 11934 This is a multi-part message in MIME format. ------=_NextPart_000_005F_01C2DCB1.A709E1C0 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_005F_01C2DCB1.A709E1C0 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 best?
------=_NextPart_000_005F_01C2DCB1.A709E1C0--