pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Jenny Zhang <jenny@osdl.org>
To: Oleg Lebedev <oleg.lebedev@waterford.org>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: TPC-R benchmarks
Date: Thu, 25 Sep 2003 20:41:15 -0700
Message-ID: <200309252041.15743.josh@agliodbs.com> (raw)
In-Reply-To: <1064528699.2082.61.camel@ibm-a.pdx.osdl.net>
References: <993DBE5B4D02194382EC8DF8554A52731D75DC@postoffice.waterford.org>
	<1064528699.2082.61.camel@ibm-a.pdx.osdl.net>

Jenny,

> create index i_l_partkey on lineitem (l_partkey);
> I do not have any foreign key defined.  Does the spec require foreign
> keys?
>
> When you create a foreign key reference, does PG create an index
> automatically?

No.   A index is not required to enforce a foriegn key, and is sometimes not 
useful (for example, FK fields with only 3 possible values).

So it may be that you need to create an index on that field.


-- 
Josh Berkus
Aglio Database Solutions
San Francisco



view thread (43+ messages)  latest in thread

Message-ID: <200309252041.15743.josh@agliodbs.com>
Permalink:  ../200309252041.15743.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200309252041.15743.josh@agliodbs.com

 · 

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-performance@postgresql.org
  Cc: josh@agliodbs.com, jenny@osdl.org, oleg.lebedev@waterford.org
  Subject: Re: TPC-R benchmarks
  In-Reply-To: <200309252041.15743.josh@agliodbs.com>

* 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