Advertisement
SQLSoldier

Simple Math CPU Pressure

Dec 10th, 2014
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.49 KB | None | 0 0
  1. If OBJECT_ID('#SampleMath') Is Not Null
  2.     Drop Table #SampleMath;
  3. Go
  4.  
  5. Create Table #SampleMath(
  6.     PK bigint identity(1,1))
  7. Go
  8.  
  9. Insert Into #SampleMath Default Values;
  10. Go 400
  11.  
  12. Select Sum(log(tS1.PK + tS2.PK)
  13.     + log(tS2.PK + tS3.PK)
  14.     + log(tS3.PK + tS4.PK)
  15.     + log(tS4.PK + tS5.PK)
  16.     + log(tS5.PK + tS1.PK))
  17. From #SampleMath tS1
  18. Cross Join #SampleMath tS2
  19. Cross Join #SampleMath tS3
  20. Cross Join #SampleMath tS4
  21. Cross Join #SampleMath tS5;
  22. Go
  23.  
  24. Drop Table #SampleMath;
  25. Go
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement