Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
856
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. CREATE TABLE BadStatistics (
  2. IsArchived BIT NOT NULL
  3. ,Id INT NOT NULL IDENTITY PRIMARY KEY
  4. ,Mystery VARCHAR(200) NOT NULL
  5. );
  6.  
  7. CREATE NONCLUSTERED INDEX BadIndex ON BadStatistics (IsArchived, Mystery);
  8.  
  9. +--------------+----------------+-------------------------+
  10. | All density | Average Length | Columns |
  11. +--------------+----------------+-------------------------+
  12. | 0.5 | 1 | IsArchived |
  13. +--------------+----------------+-------------------------+
  14. | 4.149378E-06 | 37 | IsArchived, Mystery |
  15. +--------------+----------------+-------------------------+
  16. | 4.149378E-06 | 41 | IsArchived, Mystery, Id |
  17. +--------------+----------------+-------------------------+
  18.  
  19. +--------------+------------+---------+---------------------+----------------+
  20. | RANGE_HI_KEY | RANGE_ROWS | EQ_ROWS | DISTINCT_RANGE_ROWS | AVG_RANGE_ROWS |
  21. +--------------+------------+---------+---------------------+----------------+
  22. | 0 | 0 | 24398 | 0 | 1 |
  23. +--------------+------------+---------+---------------------+----------------+
  24. | 1 | 0 | 216602 | 0 | 1 |
  25. +--------------+------------+---------+---------------------+----------------+
  26.  
  27. +--------------+----------------+---------+
  28. | All density | Average Length | Columns |
  29. +--------------+----------------+---------+
  30. | 4.149378E-06 | 4 | Id |
  31. +--------------+----------------+---------+
  32.  
  33. +--------------+------------+---------+---------------------+----------------+
  34. | RANGE_HI_KEY | RANGE_ROWS | EQ_ROWS | DISTINCT_RANGE_ROWS | AVG_RANGE_ROWS |
  35. +--------------+------------+---------+---------------------+----------------+
  36. | 1 | 0 | 1 | 0 | 1 |
  37. +--------------+------------+---------+---------------------+----------------+
  38. | 240999 | 240997 | 1 | 240997 | 1 |
  39. +--------------+------------+---------+---------------------+----------------+
  40. | 241000 | 0 | 1 | 0 | 1 |
  41. +--------------+------------+---------+---------------------+----------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement