Issue with wacky MySQL query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • f0urtyfive
    Member
    • Nov 2002
    • 71

    Issue with wacky MySQL query

    Hey...

    We're having an issue with a crazy mysql query on a 3.6 install (very large):

    # Time: 061017 14:19:16
    # User@Host: root[root] @ [10.0.0.130]
    # Query_time: 126 Lock_time: 0 Rows_sent: 85271 Rows_examined: 170542
    SELECT postid FROM post AS post WHERE postid IN(a few hundred thousand postid's here) ORDER BY post.dateline DESC;


    Whenever that query runs it backs up the whole site, presumably because of the load its causing. I'm attempting to find the offending file by greping through files for pieces of the query, but no luck yet.
  • f0urtyfive
    Member
    • Nov 2002
    • 71

    #2
    I have found where the offending query is being queried from (./includes/functions_search.php line 697) in sort_search_items() I'm setting it up to stick a backtrace into SQL comments now.

    Comment

    • f0urtyfive
      Member
      • Nov 2002
      • 71

      #3
      *bump* I've ended up just die()'ing of strlen($searchquery) is greater than 10000 or so... but I'd like to find a real solution :P

      Comment

      • Zachery
        Former vBulletin Support
        • Jul 2002
        • 59097

        #4
        You have any REALLY big threads?

        Comment

        • f0urtyfive
          Member
          • Nov 2002
          • 71

          #5
          Yes, quite a few, although I tend to convince the admin to lock them away so no one can get to them after they get too big (anytime I see a threadID in the slow-queries log, usually).

          Comment

          • Zachery
            Former vBulletin Support
            • Jul 2002
            • 59097

            #6
            Are they still in a public place?

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            😀
            😂
            🥰
            😘
            🤢
            😎
            😞
            😡
            👍
            👎