Re: Join/Datatype Performance Considerations

From: Randy Dewoolfson <randyd_at_cais3.cais.com>
Date: 1996/01/06
Message-ID: <4cmprk$a1_at_zippy.cais.net>#1/1


Randy Dewoolfson (randyd_at_cais3.cais.com) wrote:
: KevinWaters_at_DRS_at_CPLISD wrote:
: : Is anyone aware of a performance differential in joining two tables on VARCHAR2 columns versus joining them on NUMERIC columns?
 

: Here's a real non-technical answer for ya-
: use numbers.
: If you're a computer you can easily check two numbers...
: you need to check each character in a string one by one in a loop...
: The varchars will be slower...
: Randy :)
 

: --
: ..uu. ----------------------
: .?$" '?i . I Randy DeWoolfson I
: .T^M ._at_" d9 . f ,.un. b, i I--------------------I
: " Z :#" M `8 U < .dP"``"# `M _at_" I randyd_at_cais.com I
: &H?` Xl _R $5. $ ?* _at_ 'P,#" I--------------------I
: ,d#^*L :RP'~$b f`$L:M Xf .f' dH` I ,\//. I
: & 'M ,P `E M "$ Mux~ n!` I |o o| I
: dk `h" ' j " y" *~ I====oOO==(_)==Ooo===I

OK OK OK - I'm being reminded to note that of course VARCHARS are just bytes ( as NUMBERS are bytes ) and the comparison time is really based on the number of bytes that are checked.

The number of bytes varies if you have a hashing cluster, but I think it is still appropriate, in general, to use NUMBER...

Just some more thought...
Randy :)

--
    ..uu.                                     ----------------------
  .?$" '?i     .                              I  Randy DeWoolfson  I
 .T^M  ._at_"    d9    .     f   ,.un.  b,    i  I--------------------I
 "  Z :#"    M `8   U    <  .dP"``"# `M   _at_"  I  randyd_at_cais.com   I
    &H?`    Xl _R   $5.  $  ?*    _at_   'P,#"   I--------------------I
  ,d#^*L   :RP'~$b  f`$L:M  Xf  .f'    dH`    I        ,\//.       I
    &  'M ,P    `E  M   "$  Mux~      n!`     I        |o o|       I
   dk   `h"       ' j     " y"       *~       I====oOO==(_)==Ooo===I
Received on Sat Jan 06 1996 - 00:00:00 CET

Original text of this message