Skip to:
Content
Pages
Categories
Search
Top
Bottom

Found weird query running multiple times per minute


  • yesbutmaybeno
    Participant

    @yesbutmaybeno

    Hi!
    Trying to find the source of sudden weird lag on my large Buddypress website. I noticed this query running very frequently:

    # Time: 220408 21:41:46
    # User@Host: [removed] @ localhost []
    # Thread_id: 337208  Schema: [removed] QC_hit: No
    # Query_time: 1.645619  Lock_time: 0.000068  Rows_sent: 0  Rows_examined: 0
    # Rows_affected: 0  Bytes_sent: 77
    SET timestamp=1649454106;
    SELECT DISTINCT a.id  FROM wp_bp_activity a  WHERE  
    ( 
    	( 
    		( 
    			a.component = 'groups' 
    			AND 
    			a.item_id IN ( 0 )
    		)
     
    		AND 
    		a.hide_sitewide = 0
    	)
    
    )
     AND a.is_spam = 0 AND a.type NOT IN ('activity_comment', 'last_activity') ORDER BY a.date_recorded DESC, a.id DESC LIMIT 0, 16;

    Query_time: 1.645619

    It always results in nothing. So, where is it coming from and how can I stop it?
    Any idea what function is triggering this, I’d be able to even edit the core file just to have it check “if certain params are true, don’t even run this query”

    I think it’s killing my site’s performance

Viewing 2 replies - 1 through 2 (of 2 total)

  • oumz99
    Participant

    @oumz99

    This is for group activity. Is this from BuddyPress core ? Are you using any plugin which claims to make activity load “live” ?

    personally, I have always hated any code which makes periodic calls to your server.

    Thank you for the report. Can you enable the plugin Query Monitor to see if it can help trace the source of the query? It can often identify the caller, which would be a great help. Example output: https://imgur.com/xK6V63V

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar