473,320 Members | 2,122 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
8 1339
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
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
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
>> 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
--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
>> 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
--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
>> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rangan | last post by:
Does any body have solution for performing bitwise on db2 such that I can call it from function or stored proc
6
by: pankaj_wolfhunter | last post by:
Hi, We have "if exists" and "create or replace view" clause to check for the existence of a table or view in sybase and Oracle. Just wanna know is there any way we can do this in DB2? For some...
34
by: Christopher Benson-Manica | last post by:
I'm trying to compute the absolute value of an integer using only bitwise operators... int x; sscanf( "%d", &x ); printf( "%d\n", (x^((~((x>>31)&1))+1)) + ((x>>31)&1) ); That works, but it...
8
by: Sathyaish | last post by:
Hi friends, I am beginning to practice C from K&R. Although I am only familiar with the language, this time I want to invest time learning it thoroughly. I've written this practice excercise...
11
by: Gagan | last post by:
//Problem Statement // //You work for a company that sells mechanical bit counting devices. These devices //wear out when they do a lot of counting. You are going to see how much wear has...
5
by: eap90210 | last post by:
Ciao a tutti ( Hi to all ) ( sorry for my bad english ) ! I have a problem with dynamic sql. I try to read all internet but I don't understand anything ! So I hope in Serge ( I love toronto in...
7
by: DA Morgan | last post by:
compatibility features coming along? Wait 'till you get to this: CREATE TABLE test ( charcol CHAR(2000), charvaryingcol CHAR VARYING(4000), charactercol ...
8
by: Daniel Gutson | last post by:
Hi, I just wanted to share another library for doing type-safe bitwise operations in C++: http://bitwise-enum.googlecode.com I found it useful, so hopefully it'll be for somebody else as well....
0
by: Serge Rielau | last post by:
Version and platform? -- Serge Rielau DB2 Solutions Development IBM Toronto Lab
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.