Modify existing index

Started by RPKalmost 19 years ago4 messagesgeneral
Jump to latest
#1RPK
rpk.general@gmail.com

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.
Can I modify the existing index using pgAdmin? Which type of index will suit
this table? B-Tree, Hash ...? This table has frequent insertions but rare
updates.
--
View this message in context: http://www.nabble.com/Modify-existing-index-tf3621688.html#a10113528
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

#2Peter Eisentraut
peter_e@gmx.net
In reply to: RPK (#1)
Re: Modify existing index

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/

#3RPK
rpk.general@gmail.com
In reply to: Peter Eisentraut (#2)
Re: Modify existing index

How to see the details of indexes being used by a table? If I want to drop an
index, how can I do that?

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.

--
View this message in context: http://www.nabble.com/Modify-existing-index-tf3621688.html#a10114548
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

#4A. Kretschmer
andreas.kretschmer@schollglas.com
In reply to: RPK (#3)
Re: Modify existing index

am Sat, dem 21.04.2007, um 0:20:45 -0700 mailte RPK folgendes:

How to see the details of indexes being used by a table? If I want to drop an

Within psql, type '\d <tablename>'.

index, how can I do that?

DROP <INDEX>, perhaps with option CASCADE.

Please read our documentation...

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net