Advertisement
RobertBerger

query

Apr 16th, 2022
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. 24.9186s:
  2.  
  3. 25 SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
  4. FROM wp_posts
  5. INNER JOIN wp_postmeta
  6. ON ( wp_posts.ID = wp_postmeta.post_id )
  7. INNER JOIN wp_postmeta AS mt1
  8. ON ( wp_posts.ID = mt1.post_id )
  9. INNER JOIN wp_postmeta AS mt2
  10. ON ( wp_posts.ID = mt2.post_id )
  11. INNER JOIN wp_postmeta AS mt3
  12. ON ( wp_posts.ID = mt3.post_id )
  13. INNER JOIN wp_postmeta AS mt4
  14. ON ( wp_posts.ID = mt4.post_id )
  15. INNER JOIN wp_postmeta AS mt5
  16. ON ( wp_posts.ID = mt5.post_id )
  17. INNER JOIN wp_postmeta AS mt6
  18. ON ( wp_posts.ID = mt6.post_id )
  19. WHERE 1=1
  20. AND ( wp_postmeta.meta_key = 'book_until'
  21. AND ( ( ( mt1.meta_key = 'training_start'
  22. AND mt1.meta_value > '20220416' )
  23. AND ( mt2.meta_key = 'status'
  24. AND mt2.meta_value IN ('gtr','booked') )
  25. AND ( mt3.meta_key = 'status'
  26. AND mt3.meta_value != 'canceled' ) )
  27. OR ( ( mt4.meta_key = 'book_until'
  28. AND mt4.meta_value > '20220416' )
  29. AND ( mt5.meta_key = 'status'
  30. AND mt5.meta_value IN ('reserved','gtr-plus') )
  31. AND ( mt6.meta_key = 'status'
  32. AND mt6.meta_value != 'canceled' ) ) ) )
  33. AND ((wp_posts.post_type = 'post_event'
  34. AND (wp_posts.post_status = 'publish'
  35. OR wp_posts.post_status = 'acf-disabled'
  36. OR wp_posts.post_status = 'private')))
  37. GROUP BY wp_posts.ID
  38. ORDER BY wp_postmeta.meta_value ASC
  39. LIMIT 0, 6
  40. WP_Query->get_posts()
  41. Theme 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement