pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: James Cooper <jim@luckydigital.com>
To: sql <pgsql-sql@postgresql.org>
Subject: indexing
Date: Tue, 25 Feb 2003 09:38:28 +1300
Message-ID: <006a01c2dc48$94d665f0$c900a8c0@jax> (raw)

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 forigen keys(b.a_id,b.c_id).
is it best to create two non-unique indexes or one unique index on both fields?


Please advise

Ps 

I also attempted creating an index on a table i have called person on person_id and 
ran 
Explain 
select person_id from person where person_id < n 

but saw no results of my created index being used - am i doing something incorrectly

Pps
When indexing if searching tables is more important than concurrency - which type of index is best?

view thread (3+ messages)  latest in thread

Message-ID: <006a01c2dc48$94d665f0$c900a8c0@jax>
Permalink:  ../006a01c2dc48$94d665f0$c900a8c0@jax/
Also on:    postgresql.org/message-id/006a01c2dc48$94d665f0$c900a8c0@jax

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jim@luckydigital.com
  Subject: Re: indexing
  In-Reply-To: <006a01c2dc48$94d665f0$c900a8c0@jax>

* 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