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

Re: Indexing question

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: Indexing question
Date: 2012-08-14 17:33:38
Message-ID: 20120814173338.GA15693@tux (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-sql
amit sehas <cun23(at)yahoo(dot)com> wrote:

> In SQL, given a table T, with two fields f1, f2, 
> 
> is it possible to create an index such that the same record is indexed
> in the index, once with field f1 and once with field f2.  (I am not
> looking for a compound index in which the key would look like <f1,
> f2>, instead there should be two entries in the index <f1> and <f2>).  
> 
> we have a few use cases for the above, perhaps we need to alter the
> schema somehow to accommodate the above, 

2 separate indexes? One on f1 and one on f2?


Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°


In response to

pgsql-sql by date

Next:From: AlexDate: 2012-08-17 15:58:25
Subject: Error: Template Id should be teh identifier of a template - help
Previous:From: David JohnstonDate: 2012-08-14 17:19:47
Subject: Re: Indexing question

pgsql-general by date

Next:From: Scott MeadDate: 2012-08-14 18:47:56
Subject: Re: Visualize database schema
Previous:From: David JohnstonDate: 2012-08-14 17:19:47
Subject: Re: Indexing question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group