1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Will Enhanced Search add-on prevent these slow queries?

Discussion in 'XenForo Questions and Support' started by imthebest, Aug 29, 2014.

  1. imthebest

    imthebest Formerly Super120

    Code:
    # Time: 140829  5:01:15
    # User@Host: mydatabase[mydatabase] @ localhost []
    # Query_time: 3.425906  Lock_time: 0.000029 Rows_sent: 192  Rows_examined: 192
    SET timestamp=1409306475;
    SELECT search_index.content_type, search_index.content_id
      FROM xf_search_index AS search_index
      WHERE search_index.user_id = '108973'
      ORDER BY search_index.item_date DESC
      LIMIT 200;
    
    Code:
    # Time: 140829  7:16:01
    # User@Host: mydatabase[mydatabase] @ localhost []
    # Query_time: 3.301239  Lock_time: 0.000033 Rows_sent: 73  Rows_examined: 146
    SET timestamp=1409314561;
    SELECT search_index.content_type, search_index.content_id
                            FROM xf_search_index AS search_index
    
                            WHERE MATCH(search_index.title, search_index.metadata) AGAINST ('+(_md_user_107117) +_md_content_post' IN BOOLEAN MODE)
    
    
                            ORDER BY search_index.item_date desc
                            LIMIT 200;
    
    Will the Enhanced Search add-on prevent these two types of slow queries?
     
  2. Mike

    Mike XenForo Developer Staff Member

    Those queries will be run against elasticsearch, yes.
     
    imthebest likes this.
  3. imthebest

    imthebest Formerly Super120

    The same with this one?

    Code:
    # Time: 140831 18:54:15
    # User@Host: mydb[mydb] @ localhost []
    # Query_time: 4.014420  Lock_time: 0.000021 Rows_sent: 0  Rows_examined: 37
    SET timestamp=1409529255;
    DELETE FROM `xf_search_index` WHERE (content_type = 'post' AND content_id IN (3262922, 3262928, 3262947, 3262949, 3262971, 3262999, 3263036, 3263042, 3263044, 3263047, 3263053, 3264661, 3264680, 3264858, 3264960, 3264995, 3265045, 3265107, 3265110));
    Btw this query scares me... what action produced it? Is it a moderator mass deleting posts from a member?
     
  4. AndyB

    AndyB Well-Known Member

    Those slow queries will no longer be an issue when you use Enhanced Search. The xf_search_index is no longer used with Enhanced Search.
     
  5. AndyB

    AndyB Well-Known Member

    A thread was mot likely deleted.
     

Share This Page