Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 528C99F9CB6 for ; Mon, 17 Sep 2007 10:37:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 90495-05 for ; Mon, 17 Sep 2007 10:37:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 54BBB9F9CAC for ; Mon, 17 Sep 2007 10:37:12 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l8HDb90d021404; Mon, 17 Sep 2007 09:37:09 -0400 (EDT) To: "Kevin Grittner" cc: "valgog" , pgsql-performance@postgresql.org Subject: Re: Index usage when bitwise operator is used In-reply-to: <46EE2C53.EE98.0025.0@wicourts.gov> References: <46ED7CCD.EE98.0025.0@wicourts.gov> <1190015368.148293.56830@y42g2000hsy.googlegroups.com> <46EE2C53.EE98.0025.0@wicourts.gov> Comments: In-reply-to "Kevin Grittner" message dated "Mon, 17 Sep 2007 07:27:15 -0500" Date: Mon, 17 Sep 2007 09:37:09 -0400 Message-ID: <21403.1190036229@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/293 X-Sequence-Number: 26838 "Kevin Grittner" writes: > On Mon, Sep 17, 2007 at 2:49 AM, in message > <1190015368.148293.56830@y42g2000hsy.googlegroups.com>, valgog > wrote:=20 >> Are you sure you understood what was the question? >> >> Is the TBL1.CATEGORY = TBL2.CATEGORY the same as TBL1.CATEGORY & >> TBL2.CATEGORY > 0? > Yes, given that he stipulated that one and only one bit would be set. Really? In that case, isn't this bit-field just a bad implementation of an enum-style field? regards, tom lane