WPIntell

Source evidence

Database query very slow, missing join ON clause

Inazo's flamingo automatically delete old messages · support · 2026-05-01T19:07:00+00:00

complaintsentiment
highseverity
0.88relevance
0replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 34 rows with source links

11.8% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

30 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
justink unresolved
Using the latest version available of this plugin. On a large database with 18k rows in posts table, and 1.4 million in postmeta, this query was taking 1800+ seconds and getting killed by pt-kill. # Query_time: 1837.006869 Lock_time: 0.000001 Rows_sent: 0 Rows_examined: 1233843 SELECT DISTINCT(ID) FROM wp_posts INNER JOIN wp_postmeta as pm WHERE post_type="flamingo_inbound" AND ( TIMESTAMPDIFF(DAY, post_date, NOW()) ) >= 5 AND ( (pm.meta_key = "_submission_status" AND pm.meta_value ="spam") OR post_status="flamingo-spam" ) LIMIT 0, 10000; There doesn’t appear to be an ON clause describing how the two tables are joined. It looks like it needs this added: ON pm.post_id=wp_xbxhw9_posts.id This would appear to take the rows examined from billions to more in the 200k rows, and from 1800+ seconds to 1.12 seconds. Not sure this is the best code fix, but a potential fix is in file inazo-flamingo-automatically-delete-old-messages.php, line 171, add: ON pm.post_id = '.$wpdb->prefix.'posts.ID Let me know if you have further questions. I hope this can speed up other users of this plugin.

Comments

0 shown

No comments were stored for this source.