Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: BITAND with large integers

Re: BITAND with large integers

From: Daniel Roy <danielroy10junk_at_hotmail.com>
Date: 15 Dec 2003 07:56:58 -0800
Message-ID: <3722db.0312150756.39d11970@posting.google.com>


You have an interesting Oracle version, that I never heard of :-). Please post your SQL and the execution plan, and we'll be able to offer help. The relevant tables data (# of records) and indexes could also be useful, to try to reproduce your situation.

Daniel

"Matt" <not_at_this.address.com> wrote in message news:<3fdd0fbf$0$18386$afc38c87_at_news.optusnet.com.au>...
> I have a problem relating to BITAND in Oracle Server 8.7.1. The context of
> the problem is that I use the BITAND function in SQL for filtering data in
> queries of large tables in a data warehouse environment. The performance of
> the queries is high priority.
>
> I have written a PL/SQL module that relies on the ability of BITAND to
> accept arguments as described in the Oracle 8.7.1 SQL Reference. In the
> section on BITAND the reference manual states that the arguments must
> resolve to non-negative integers. The arguments I pass are non-negative
> integers of the PL/SQL data type INTEGER, INT or SMALLINT and range in size
> up to a maximum precision of 38 decimal places.
>
> However, BITAND appears to return incorrect results when for arguments are
> greater than 2^31. No error condition occurs. Just wrong results. I assume
> this is because BITAND is limited to accept arguments of the type
> BINARY_INTEGER, although the Oracle SQL Reference document does not appear
> to state this limitation.
>
> I am aware that I could write my own version of BITAND as a stored function
> to handle larger integers. However, because the performance of the SQL is
> critical I am asking if anyone can suggest an efficient way to do this, or a
> better solution.
>
> Any advice would be appreciated.
>
> Matt
Received on Mon Dec 15 2003 - 09:56:58 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US