Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: using constants
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
![]() |
![]() |