Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T1Kzv-00051e-FA; Tue, 14 Aug 2012 17:33:43 +0000 Received: from mailout02.ims-firmen.de ([213.174.32.97]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T1Kzt-0004GT-Ow; Tue, 14 Aug 2012 17:33:42 +0000 Received: from mailin03.ims-firmen.de ([192.168.1.143]) by mailout02.ims-firmen.de with esmtp (envelope-from ) id 1T1Kzt-0006eY-jA; Tue, 14 Aug 2012 19:33:41 +0200 Received: from [87.170.171.26] (helo=a-kretschmer.de) by mailin03.ims-firmen.de with esmtpsa (TLSv1:AES256-SHA:256) (envelope-from ) id 1T1Kzu-00064L-8y; Tue, 14 Aug 2012 19:33:42 +0200 Received: from kretschmer by a-kretschmer.de with local (Exim 4.69) (envelope-from ) id 1T1Kzq-000485-ET; Tue, 14 Aug 2012 19:33:38 +0200 Date: Tue, 14 Aug 2012 19:33:38 +0200 From: Andreas Kretschmer To: pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Re: Indexing question Message-ID: <20120814173338.GA15693@tux> References: <1344963288.3544.YahooMailClassic@web125305.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1344963288.3544.YahooMailClassic@web125305.mail.ne1.yahoo.com> X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: Mutt/1.5.18 (2008-05-17) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/286 X-Sequence-Number: 189463 amit sehas 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 f2>, instead there should be two entries in the index and ). > > 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°