Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Modify existing index


  • From: Peter Eisentraut <peter_e(at)gmx(dot)net>
  • To: pgsql-general(at)postgresql(dot)org
  • Cc: RPK <rpk(dot)general(at)gmail(dot)com>
  • Subject: Re: Modify existing index
  • Date: Sat, 21 Apr 2007 08:37:43 +0200
  • Message-id: <200704210837(dot)44254(dot)peter_e(at)gmx(dot)net>

RPK wrote:
> I have a table and a column that is primary key. I want to modify the
> existing index and use two other columns to be used for indexing.
> Since queries will be run using these two columns, hence I want to
> use them.

The choice of what your primary key is should arise from the schema 
design, not the frequency of queries.  If you are querying columns 
other than the primary key, just add another index.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group