Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YQwMZ-0007zf-BK for pgsql-performance@arkaria.postgresql.org; Thu, 26 Feb 2015 11:12:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YQwMX-00056I-Eb for pgsql-performance@arkaria.postgresql.org; Thu, 26 Feb 2015 11:12:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YQwMW-00056C-Gp for pgsql-performance@postgresql.org; Thu, 26 Feb 2015 11:12:12 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YQwMS-00087S-O6 for pgsql-performance@postgresql.org; Thu, 26 Feb 2015 11:12:10 +0000 Received: from comserver.tbz-pariv.de ([194.113.71.71]) by mrelayeu.kundenserver.de (mreue003) with ESMTPSA (Nemesis) id 0MKMjK-1YPHnf31wE-001ghw; Thu, 26 Feb 2015 12:03:33 +0100 Received: from localhost (localhost [127.0.0.1]) by comserver.tbz-pariv.de (Postfix) with ESMTP id A4F8E218A6; Thu, 26 Feb 2015 12:03:24 +0100 (CET) X-Virus-Scanned: amavisd-new at tbz-pariv.de Received: from comserver.tbz-pariv.de ([127.0.0.1]) by localhost (comserver.tbz-pariv.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7f32845ry_tS; Thu, 26 Feb 2015 12:03:22 +0100 (CET) Received: from [172.17.6.169] (apsrkunze.tbz-pariv.lan [172.17.6.169]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by comserver.tbz-pariv.de (Postfix) with ESMTPSA id AFF97212FE; Thu, 26 Feb 2015 12:03:22 +0100 (CET) Message-ID: <54EEFDA1.7020609@tbz-pariv.de> Date: Thu, 26 Feb 2015 12:04:01 +0100 From: "Sven R. Kunze" Organization: TBZ-PARIV GmbH User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Josh Berkus , Tom Lane CC: pgsql-performance@postgresql.org Subject: Re: Reverse Key Index References: <54DF9036.8080502@tbz-pariv.de> <7978.1423937899@sss.pgh.pa.us> <54DF9559.8080109@tbz-pariv.de> <54EE4D45.1060704@agliodbs.com> In-Reply-To: <54EE4D45.1060704@agliodbs.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:Jr+bnZSrm+eB8FLxkf9DatK6gki4Ga5OwEoDYyOevnV2kuaGLyW FWE+Jk4K5kuXpVcrQuzEf2jxahmqUBA2wKnsR++KP9a0fgo0Fog9CqAa1pSuBQYcbNKRJo2 ic/oduxucues5w4V41wjwStqi02hPiDL6TtBkEnmdDaTkuMRKAXemrPAURdszPOgIdUn8Wb cdIrp/Iz58+bKsmsfWY/w== X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 25.02.2015 23:31, Josh Berkus wrote: > On 02/14/2015 10:35 AM, Sven R. Kunze wrote: >> Thanks for the immediate reply. >> >> I understand the use case is quite limited. >> >> On the other hand, I see potential when it comes to applications which >> use PostgreSQL. There, programmers would have to change a lot of code to >> tweak existing (and more importantly working) queries to hash/reverse an >> id column first. Using ORMs would make this change even more painful and >> maybe even impossible. >> >> When reading >> https://richardfoote.wordpress.com/2008/01/14/introduction-to-reverse-ke= y-indexes-part-i/ >> carefully, it also seems to work with index scan partially in case of >> equality comparisons. > Seems like a good use for SP-GiST. Go for it! > I just thought about btree indexes here mainly because they well-known=20 and well-used in ORM frameworks. Considering the documentation and=20 third-party posts on GiST and btree_gist, at least to me, it seems as if=20 people would not want to use that for integers; which in turn is the=20 main use-case scenario for reverse key indexes. --=20 Sven R. Kunze TBZ-PARIV GmbH, Bernsdorfer Str. 210-212, 09126 Chemnitz Tel: +49 (0)371 33714721, Fax: +49 (0)371 5347920 e-mail: srkunze@tbz-pariv.de web: www.tbz-pariv.de Gesch=C3=A4ftsf=C3=BChrer: Dr. Reiner Wohlgemuth Sitz der Gesellschaft: Chemnitz Registergericht: Chemnitz HRB 8543 --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance