Advertisement
Guest User

Untitled

a guest
Jan 11th, 2021
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. Range condition isn't the issue.
  2.  
  3. Mem 128GB, Innodb buffer 96GB,
  4.  
  5. That really is the distilled schema and the explain looks like this:
  6.  
  7. id select_type table partitions type possible_keys key key_len ref rows filtered Extra
  8. 1 SIMPLE tbl ref PRIMARY,MemberA_status MemberA_status 5 const,const 36178 100.0 Using temporary;Using filesort
  9. 1 SIMPLE tblDates eq_ref PRIMARY,tblID_type_createdDate PRIMARY 5 mlenz.tbl.ID,const 1 100.0
  10.  
  11. for:
  12.  
  13. SELECT
  14. tbl.ID
  15. , tbl.MemberA
  16. , tbl.MemberB
  17. , tbl.status
  18. , tblDates.createdDate
  19. FROM
  20. tbl
  21. JOIN tblDate ON
  22. tblDates.tblID = tbl.ID
  23. AND tblDates.type = 'T5'
  24. WHERE
  25. tbl.MemberA = 4312
  26. AND tbl.status = 'S4'
  27. ORDER BY tblDates.createdDate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement