SHARE
TWEET

CPU hash comp

a guest Dec 31st, 2014 654 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT  sod.SalesOrderID
  2.                 , sod.CarrierTrackingNumber
  3.                 , CHECKSUM(sod.CarrierTrackingNumber)
  4. FROM Sales.SalesOrderDetail AS sod
  5. PRINT 'Checksum'
  6.  
  7. SELECT  sod.SalesOrderID
  8.                 , sod.CarrierTrackingNumber
  9.                 , BINARY_CHECKSUM(sod.CarrierTrackingNumber)
  10. FROM Sales.SalesOrderDetail AS sod
  11. PRINT 'Binary Checksum'
  12.  
  13. SELECT  sod.SalesOrderID
  14.                 , sod.CarrierTrackingNumber
  15.                 , HASHBYTES('SHA', sod.CarrierTrackingNumber)
  16. FROM Sales.SalesOrderDetail AS sod
  17. PRINT 'Hashbytes SHA'
  18.  
  19. SELECT  sod.SalesOrderID
  20.                 , sod.CarrierTrackingNumber
  21.                 , HASHBYTES('SHA1', sod.CarrierTrackingNumber)
  22. FROM Sales.SalesOrderDetail AS sod
  23. PRINT 'Hashbytes SHA1'
  24.  
  25. SELECT  sod.SalesOrderID
  26.                 , sod.CarrierTrackingNumber
  27.                 , HASHBYTES('SHA2_256', sod.CarrierTrackingNumber)
  28. FROM Sales.SalesOrderDetail AS sod
  29. PRINT 'Hashbytes SHA2_256'
  30.  
  31. SELECT  sod.SalesOrderID
  32.                 , sod.CarrierTrackingNumber
  33.                 , HASHBYTES('SHA2_512', sod.CarrierTrackingNumber)
  34. FROM Sales.SalesOrderDetail AS sod
  35. PRINT 'Hashbytes SHA2_512'
  36.  
  37.  
  38. SELECT  sod.SalesOrderID
  39.                 , sod.CarrierTrackingNumber
  40.                 , HASHBYTES('MD2', sod.CarrierTrackingNumber)
  41. FROM Sales.SalesOrderDetail AS sod
  42. PRINT 'Hashbytes MD2'
  43.  
  44. SELECT  sod.SalesOrderID
  45.                 , sod.CarrierTrackingNumber
  46.                 , HASHBYTES('MD4', sod.CarrierTrackingNumber)
  47. FROM Sales.SalesOrderDetail AS sod
  48. PRINT 'Hashbytes MD4'
  49.  
  50. SELECT  sod.SalesOrderID
  51.                 , sod.CarrierTrackingNumber
  52.                 , HASHBYTES('MD5', sod.CarrierTrackingNumber)
  53. FROM Sales.SalesOrderDetail AS sod
  54. PRINT 'Hashbytes MD5'
  55.  
  56.  SQL Server Execution Times:
  57.    CPU time = 47 ms,  elapsed time = 481 ms.
  58. Checksum
  59.  
  60.  SQL Server Execution Times:
  61.    CPU time = 47 ms,  elapsed time = 536 ms.
  62. Binary Checksum
  63.  
  64.  SQL Server Execution Times:
  65.    CPU time = 125 ms,  elapsed time = 488 ms.
  66. Hashbytes SHA
  67.  
  68.  SQL Server Execution Times:
  69.    CPU time = 109 ms,  elapsed time = 497 ms.
  70. Hashbytes SHA1
  71.  
  72.  SQL Server Execution Times:
  73.    CPU time = 140 ms,  elapsed time = 544 ms.
  74. Hashbytes SHA2_256
  75.  
  76.  SQL Server Execution Times:
  77.    CPU time = 125 ms,  elapsed time = 514 ms.
  78. Hashbytes SHA2_512
  79.  
  80.  SQL Server Execution Times:
  81.    CPU time = 609 ms,  elapsed time = 802 ms.
  82. Hashbytes MD2
  83.  
  84.  SQL Server Execution Times:
  85.    CPU time = 78 ms,  elapsed time = 543 ms.
  86. Hashbytes MD4
  87.  
  88.  SQL Server Execution Times:
  89.    CPU time = 93 ms,  elapsed time = 467 ms.
  90. Hashbytes MD5
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top