Guest User

Untitled

a guest
Jun 21st, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None | 0 0
  1. 2019-06-21 16:39:45 GMT+0000 (DEBUG): Slow query (32.57 seconds): /* ------------------ /home/middletonj/public_html/wp-content/plugins/404-solution/includes/sql/getRedirectsForView.sql BEGIN ----- */
  2.  
  3. select
  4. wp_abj404_redirects.id,
  5. wp_abj404_redirects.url,
  6. wp_abj404_redirects.status,
  7. (CASE
  8. when wp_abj404_redirects.status = 1 then 'Man'
  9. when wp_abj404_redirects.status = 2 then 'Auto'
  10. when wp_abj404_redirects.status = 6 then 'RegEx'
  11. else 'Unknown'
  12. end) as status_for_view,
  13. wp_abj404_redirects.type,
  14. (CASE
  15. when wp_abj404_redirects.type = 4 then 'External'
  16. when wp_abj404_redirects.type = 2 then 'Category'
  17. when wp_abj404_redirects.type = 3 then 'Tag'
  18. when wp_abj404_redirects.type = 5 then 'Home Page'
  19. when wp_abj404_redirects.type = 1 then
  20. CONCAT(UCASE(LEFT(wp_posts.post_type, 1)), LCASE(SUBSTRING(wp_posts.post_type, 2)))
  21. else 'Unknown'
  22. end) as type_for_view,
  23. wp_abj404_redirects.final_dest,
  24. (case
  25. when wp_abj404_redirects.type = 4 then wp_abj404_redirects.final_dest
  26. when wp_abj404_redirects.type = 1 then wp_posts.post_title
  27. when wp_abj404_redirects.type = 2 then terms.name
  28. when wp_abj404_redirects.type = 3 then terms.name
  29. when wp_abj404_redirects.type = 5 then wp_options.option_value
  30. else '? Dest Type'
  31. end) as dest_for_view,
  32.  
  33. wp_abj404_redirects.code,
  34. wp_abj404_redirects.timestamp,
  35. wp_posts.id as wp_post_id,
  36.  
  37. logstable.logshits as logshits,
  38. logstable.logsid,
  39. logstable.last_used,
  40.  
  41.  
  42. wp_posts.post_type as wp_post_type
  43.  
  44. from msyyx_abj404_redirects wp_abj404_redirects
  45.  
  46. LEFT OUTER JOIN msyyx_posts wp_posts
  47. on wp_abj404_redirects.final_dest = wp_posts.id
  48.  
  49. LEFT OUTER JOIN msyyx_abj404_logs_hits logstable
  50. on wp_abj404_redirects.url = logstable.requested_url
  51.  
  52.  
  53.  
  54. left outer join msyyx_terms terms
  55. on wp_abj404_redirects.final_dest = terms.term_id
  56.  
  57. left outer join msyyx_options wp_options
  58. on wp_options.option_name = 'blogname'
  59.  
  60. where 1 and (status in (1, 2, 6)) and disabled = 0
  61.  
  62. /* no redirects fiter text found
  63. and replace(lower(CONCAT(wp_abj404_redirects.url, '////',
  64. (CASE
  65. when wp_abj404_redirects.status = 1 then 'Man'
  66. when wp_abj404_redirects.status = 2 then 'Auto'
  67. when wp_abj404_redirects.status = 6 then 'RegEx'
  68. else 'Unknown'
  69. end), '////',
  70. (CASE
  71. when wp_abj404_redirects.type = 4 then 'External'
  72. when wp_abj404_redirects.type = 2 then 'Category'
  73. when wp_abj404_redirects.type = 3 then 'Tag'
  74. when wp_abj404_redirects.type = 5 then 'Home Page'
  75. when wp_abj404_redirects.type = 1 then
  76. CONCAT(UCASE(LEFT(wp_posts.post_type, 1)), LCASE(SUBSTRING(wp_posts.post_type, 2)))
  77. else 'Unknown'
  78. end), '////',
  79. (case
  80. when wp_abj404_redirects.type = 4 then wp_abj404_redirects.final_dest
  81. when wp_abj404_redirects.type = 1 then wp_posts.post_title
  82. when wp_abj404_redirects.type = 2 then terms.name
  83. when wp_abj404_redirects.type = 3 then terms.name
  84. when wp_abj404_redirects.type = 5 then wp_options.option_value
  85. else '? Dest Type'
  86. end), '////',
  87. wp_abj404_redirects.code)
  88. ), ' ', '')
  89. like replace(lower('%%'), ' ', '')
  90. /* */
  91.  
  92. /* no captured 404s filter text found
  93. and replace(lower(wp_abj404_redirects.url), ' ', '') like replace(lower('%%'), ' ', '')
  94. /* */
  95.  
  96. order by logshits ASC
  97.  
  98. limit 0, 500
  99.  
  100. /* ------------------ /home/middletonj/public_html/wp-content/plugins/404-solution/includes/sql/getRedirectsForView.sql END ----- */
  101.  
  102. 2019-06-21 16:39:58 GMT+0000 (DEBUG): Processing request for action: (none)
  103. 2019-06-21 16:39:58 GMT+0000 (DEBUG): Displaying sub page: abj404_options
  104. 2019-06-21 16:40:11 GMT+0000 (DEBUG): Processing request for action: (none)
  105. 2019-06-21 16:40:11 GMT+0000 (DEBUG): Displaying sub page: abj404_debugfile
Advertisement
Add Comment
Please, Sign In to add comment