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

Home -> Community -> Usenet -> c.d.o.misc -> Re: using constants

Re: using constants

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Fri, 30 Nov 2007 21:03:59 +0100
Message-ID: <fipqbf$9v6$1@news2.zwoll1.ov.home.nl>


Marten Lehmann wrote:
[snip]
>
> Mathematically it should be faster to compare two 4 byte non-zero
> integer values than two at least 8 byte strings. But the first solution
> is more elegant and intuitive.
>

Go for the intuitive part - your math is off. First of all, it's not math, it's electronics: 2 registers are being compared, and the outcome is what we would interpret as 0 or 1. The actual state would be absence or presence of electrical tension.
It does not matter if there are 4 bytes to be compared, or 8.

Besides, you would have these columns indexed (primary keys are!). Check how indexes are built (dump them) and redo your math.

-- 
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Received on Fri Nov 30 2007 - 14:03:59 CST

Original text of this message

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