Database error
Hi, I get some problems with my db and the cron job.
Any idea how to fix or manage?
Maybe there are too many users or ads?
Load..
WordPress-Datenbank-Fehler The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay für Abfrage
SELECT
p.ID,
p.post_author,
p.post_title,
p.post_date,
pm.meta_value AS expire_date,
u.user_email,
COALESCE(t.postcount, 0) AS total_views,
COALESCE(SUM(d.postcount), 0) AS week_views
FROM
wp_posts as p
INNER JOIN wp_postmeta AS pm ON p.ID = pm.post_id AND pm.meta_key = 'cp_sys_expire_date'
INNER JOIN wp_users AS u ON u.ID = p.post_author
LEFT JOIN wp_cp_ad_pop_total AS t ON t.postnum = p.ID
LEFT JOIN wp_cp_ad_pop_daily AS d ON d.postnum = p.ID AND d.time >= DATE_SUB(NOW(), INTERVAL 1 WEEK)
WHERE
p.post_type = 'ad_listing' AND p.post_status = 'publish'
GROUP BY p.ID
ORDER BY u.ID von CP_Ads_Stats->send_stats_emails, CP_Ads_Stats->get_ads
Query db..
Empty query