Received: from davis.DEMOG.Berkeley.EDU (davis.DEMOG.Berkeley.EDU [128.32.93.8]) by hub.org (8.9.3/8.9.3) with ESMTP id BAA03563 for ; Mon, 17 Apr 2000 01:02:50 -0400 (EDT) (envelope-from aperrin@demog.berkeley.edu) Received: from localhost (aperrin@localhost) by davis.DEMOG.Berkeley.EDU (8.9.3/8.9.1) with ESMTP id WAA02625 for ; Sun, 16 Apr 2000 22:01:17 -0700 (PDT) Date: Sun, 16 Apr 2000 22:01:17 -0700 (PDT) From: Andrew Perrin - Demography To: pgsql-sql@postgresql.org Subject: indexes and keys Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200004/161 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@demog.berkeley.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