Problematic Query is Too Large
-
Hello, I have a client using Slim Stats and had their GoDaddy support team send them a message saying they had a DB query that was much too large. They cited the following code as the culprit.
`You will need to correct the following query:
Problematic query:
INSERT INTO wp_slim_stats (ip
,language
,country
,domain
,referer
,searchterms
,resource
,visit_id
,dt
,browser_id
)
SELECT ‘404437658’,’en-us’,’us’,’urbanbushbabes.com’,’https://urbanbushbabes.com/’,”,’/?page_id=1011′,’623749′,’1351853586′,’2′
FROM DUAL
WHERE NOT EXISTS ( SELECTid
FROM wp_slim_stats
WHEREip
= ‘404437658’ ANDlanguage
= ‘en-us’ ANDcountry
= ‘us’ ANDdomain
= ‘urbanbushbabes.com’ ANDreferer
= ‘https://urbanbushbabes.com/’ ANDsearchterms
= ” ANDresource
= ‘/?page_id=1011’ ANDvisit_id
= ‘623749’ AND (TIME_TO_SEC(TIMEDIFF(FROM_UNIXTIME(‘1351853586’),FROM_UNIXTIME(dt
))) < 30) ANDbrowser_id
= ‘2’ LIMIT 1 )EXPLAIN:
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY No tables used
2 SUBQUERY wp_slim_stats ALL 1604794 Using whereThis query examines 1,604,794 rows, which is unacceptable in shared hosting.
Any thoughts on what is doing this? Thanks!
- The topic ‘Problematic Query is Too Large’ is closed to new replies.