| From: | Josh Berkus <josh(at)agliodbs(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Cc: | Michael Groth <geek_1981(at)yahoo(dot)de> |
| Subject: | Re: [DEFAULT] Daily digest v1.4379 (25 messages) |
| Date: | 2004-04-10 03:15:59 |
| Message-ID: | 200404092015.59117.josh@agliodbs.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Michael,
> > is it possible to use an index on the expression '(table_1.field &
> > table_2.field)::int > 0' ?
Not practically, no.
If it's important to you for comparisons to be indexed, then stop doing
bitwise stuff and normalize your tables. Bitwise fields are what is known
as "non-atomic" data, and violate the First Normal Form (or is it the Second?
Don't recall). Your particular problem is one of the illustrations of why
they are problematic.
The only times I use bitwise fields in my systems is when:
a) their content is going to be processed entirely by external (middleware/
interface) code and not queries, and
b) they will never themselves be a search condition.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
| From | Date | Subject | |
|---|---|---|---|
| Next Message | rm_pg | 2004-04-10 06:16:40 | Re: PostgreSQL configuration |
| Previous Message | pgsql | 2004-04-10 02:43:15 | Re: PostgreSQL configuration |