X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id AF2179FA278 for ; Thu, 11 May 2006 13:12:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 33557-06 for ; Thu, 11 May 2006 13:12:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from 137086.vserver.de (vs137086.vserver.de [62.75.137.86]) by postgresql.org (Postfix) with ESMTP id 58B1C9FA19B for ; Thu, 11 May 2006 13:12:28 -0300 (ADT) Received: from a-kretschmer.de (p54B3AB84.dip0.t-ipconnect.de [84.179.171.132]) (authenticated bits=0) by 137086.vserver.de (8.12.8/8.12.8) with ESMTP id k4BGCJ0p010082 for ; Thu, 11 May 2006 18:12:22 +0200 Received: from kretschmer by a-kretschmer.de with local (Exim 4.61) (envelope-from ) id 1FeDnB-0002Wv-NO for pgsql-sql@postgresql.org; Thu, 11 May 2006 18:13:33 +0200 Date: Thu, 11 May 2006 18:13:33 +0200 From: Andreas Kretschmer To: pgsql-sql@postgresql.org Subject: Re: Multi-column index not used, new flipped column index is Message-ID: <20060511161333.GA7577@KanotixBox> References: <20060510183235.GB18485@KanotixBox> <20060510235424.40005.qmail@web50301.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20060510235424.40005.qmail@web50301.mail.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-ng 1.5.9i (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/100 X-Sequence-Number: 25131 ogjunk-pgjedan@yahoo.com schrieb: > Hi Andreas and Markus, > > Bitmap indices sound like a good reason to go from 8.0 to 8.1. Is 8.2 > around the corner, by any chance? IIRC in autumn/winter. If it is finish ;-) > > I searched PG docs to see if I need to do something special to create > Bitmap indices, but couldn't find any information. Are the indices > created the same old CREATE INDEX .... ON Table(column(s)) way and it > is just PG that can choose to use them in this "Bitmap index-way"? Yes, you create indexes on the old way. You have a table with many columns, say, a,b,c,d. On a and b you have a index. Now you have select a,b,c,d from table where a=N and b=M; Prior, PG use one index first and then the other. Now, since 8.1, it combines both indexes in memory first and need only one bitmap index scan on the table. If you have many indexes, and suitable selects, you get a high performance boost. Read http://www.postgresql.org/docs/8.1/static/release-8-1.html, 2nd point. HTH, 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." (unknow) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°