By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,159 Members | 1,941 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,159 IT Pros & Developers. It's quick & easy.

2 Serge Rielau: please, repost bitwise ops implementation (udfbit)

P: n/a
Hello, Serge.

A while ago

SR> Subject: Re: poor query performance
SR> Date: Thu, 08 Sep 2005 06:31:52 -0400
SR> Message-ID: <3o************@individual.net>

you have posted here your implementation of the bitwise operations
functions. For BIGINT case the both declarations and implementations
present, but VARCHAR case missed implementation (Bit_AndVc, Bit_OrVc
and so on). Could you post your VARCHAR bitwise functions'
implementation ?

Thank you in advance.
--
Konstantin Andreev.

May 26 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Konstantin Andreev wrote:
Hello, Serge.

A while ago

SR> Subject: Re: poor query performance
SR> Date: Thu, 08 Sep 2005 06:31:52 -0400
SR> Message-ID: <3o************@individual.net>

you have posted here your implementation of the bitwise operations
functions. For BIGINT case the both declarations and implementations
present, but VARCHAR case missed implementation (Bit_AndVc, Bit_OrVc
and so on). Could you post your VARCHAR bitwise functions'
implementation ?

I'd have to code them up myself.... Is it that hard to adapt?

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
May 26 '06 #2

P: n/a
Serge Rielau wrote:

SR> > Could you post your VARCHAR bitwise functions' (Bit_AndVc,
Bit_OrVc) implementation ?
SR> >
SR> I'd have to code them up myself....
Don't it :)

SR> Is it that hard to adapt?
Definitely no. I was just thinking you already have this
implementation.
Thank you.
--
Konstantin Andreev.

May 26 '06 #3

P: n/a
Konstantin Andreev wrote:
Serge Rielau wrote:

SR> > Could you post your VARCHAR bitwise functions' (Bit_AndVc,
Bit_OrVc) implementation ?
SR> >
SR> I'd have to code them up myself....
Don't it :)

SR> Is it that hard to adapt?
Definitely no. I was just thinking you already have this
implementation.

Post them when you have them. :-)

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
May 26 '06 #4

P: n/a
>> you have posted here your implementation of the bitwise operations functions.\<<

A better question is why are you doing BIT operations in SQL? This
language was never meant to be used as a replacement for Assembly
Language and doing this low-level work in it is a sign of very, very
poor DDL and programming.

May 28 '06 #5

P: n/a
--CELKO-- wrote:
you have posted here your implementation of the bitwise operations functions.\<<


A better question is why are you doing BIT operations in SQL? This
language was never meant to be used as a replacement for Assembly
Language and doing this low-level work in it is a sign of very, very
poor DDL and programming.

or a sign of a missing boolean data type.
When I think of some warehouses with lots of binary properties in the
row, I see no harm...

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
May 28 '06 #6

P: n/a
>> When I think of some warehouses with lots of binary properties in the row, I see no harm... <<

And I see the need for a status code to replace "a bit vector" of
assorted related attributes that have be split out of a single
attribute.

May 29 '06 #7

P: n/a
--CELKO-- wrote:
When I think of some warehouses with lots of binary properties in the row, I see no harm... <<


And I see the need for a status code to replace "a bit vector" of
assorted related attributes that have be split out of a single
attribute.

How are:
"Owns house" (Y/N), "Gender" (M/F), etc, etc related?
Joe I see your point that technology can and is abused. But you appear
to be unwilling to accept that not everyone is an idiot.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
May 30 '06 #8

P: n/a
>> How are: "Owns house" (Y/N), "Gender" (M/F), etc, etc related? <<

Those are not, but you will see gender and pregnant flags which need to
have a constraint to be sure that you do not get a pregnant male. But
nobody bothers to write the constaint.

My favorite was yes/no questions -- the most binary of all -- that also
needs to have "n/a", "not answered", "yes implied by previous answers",
"no implied by previous answers" for a survey DB model.

May 31 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.