Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Mon, 17 May 2004 @ 14:07:13 GMT

  <Prev Next>   <<First <Prev Next> Last>>  

Subj:   Re: Are Numeric Keys and Indices more efficient?
From:   Geoffrey Rommel

  I was always told that these were more efficient (i.e. faster) than character fields. Is this still (or was it ever) true? If it does make a difference, has anyone seen any reliable statistics for how big of a difference it makes?  

This question came up recently here. I did not conduct a systematic test, but I did test one scenario.

To compare the speed of decimal(13) vs. char(15), I copied the A and B tables to a work area twice. One copy of each table had a decimal(13) primary index; the other copy had char(15). Otherwise, they were identical. All tables had the same primary index. I then joined them. The results were as follows:

                 Elapsed time Total CPU  Total I/O's
     decimal(13) 5:28         1,931.18   1,950,115
     char(15)    5:21         4,043.43   8,818,803

These results came as a surprise to me. I guess numerics are a lot better after all!

  <Prev Next>   <<First <Prev Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016