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

Re: Index usage when bitwise operator is used

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "valgog" <valgog(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Index usage when bitwise operator is used
Date: 2007-09-17 13:37:09
Message-ID: 21403.1190036229@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> On Mon, Sep 17, 2007 at  2:49 AM, in message
> <1190015368(dot)148293(dot)56830(at)y42g2000hsy(dot)googlegroups(dot)com>, valgog
> <valgog(at)gmail(dot)com> 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

In response to

Responses

pgsql-performance by date

Next:From: Kevin GrittnerDate: 2007-09-17 14:30:26
Subject: Re: Index usage when bitwise operator is used
Previous:From: Decibel!Date: 2007-09-17 12:27:39
Subject: Re: [Again] Postgres performance problem

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