Support » Plugin: SlimStat Analytics » Problematic Query is Too Large

  • Resolved johnbhartley

    (@johnbhartley)


    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’,’http://urbanbushbabes.com/’,”,’/?page_id=1011′,’623749′,’1351853586′,’2′
    FROM DUAL
    WHERE NOT EXISTS ( SELECT id
    FROM wp_slim_stats
    WHERE ip = ‘404437658’ AND language = ‘en-us’ AND country = ‘us’ AND domain = ‘urbanbushbabes.com’ AND referer = ‘http://urbanbushbabes.com/&#8217; AND searchterms = ” AND resource = ‘/?page_id=1011’ AND visit_id = ‘623749’ AND (TIME_TO_SEC(TIMEDIFF(FROM_UNIXTIME(‘1351853586’),FROM_UNIXTIME(dt))) < 30) AND browser_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 where

    This query examines 1,604,794 rows, which is unacceptable in shared hosting.

    Any thoughts on what is doing this? Thanks!

    http://wordpress.org/extend/plugins/wp-slimstat/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Problematic Query is Too Large’ is closed to new replies.