From: | Andrew Perrin - Demography <aperrin(at)demog(dot)berkeley(dot)edu> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | indexes and keys |
Date: | 2000-04-17 05:01:17 |
Message-ID: | Pine.SUN.4.10.10004162158200.2584-100000@davis.DEMOG.Berkeley.EDU |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Greetings - I hope this is a simple question.
Is there any reason to create an index on a column that already has one
created as part of a SERIAL datatype? That is, I used:
CREATE TABLE personal_data (id serial ...);
to create it, so \d shows:
| postgres | personal_data | table |
| postgres | personal_data | table |
| postgres | personal_data_id_key | index |
| postgres | personal_data_id_seq | sequence |
is there any reason to create another index on id:
CREATE INDEX pd_id_idx on personal_data;
or will the automatically created one be sufficient?
Thanks.
---------------------------------------------------------------------
Andrew J. Perrin - aperrin(at)demog(dot)berkeley(dot)edu - NT/Unix Admin/Support
Department of Demography - University of California at Berkeley
2232 Piedmont Avenue #2120 - Berkeley, California, 94720-2120 USA
http://demog.berkeley.edu/~aperrin --------------------------SEIU1199
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-04-17 06:03:44 | Re: indexes and keys |
Previous Message | Tom Lane | 2000-04-16 05:04:10 | Re: Re: going gaga on creating an aggregate... [solved of course...] |