Menu

Statistics - slow and high cpu load

UNIX Help
Klaus
2008-11-07
2013-04-25
  • Klaus

    Klaus - 2008-11-07

    Some days ago there began some problems calling the statistics, pictures, date and so on.
    Waiting time was between 100 and 200 seconds.
    I've got problems with my web hoster, who told me, cpu lpoad was about 95% calling this item.
    And he said, the code which calls the database should be optimized. He showed me this part of the code:
    ---
    SELECT linpha_stats.md5sum, count( linpha_stats.id ) AS nr_count, max( linpha_stats.stats_time ) AS max_time
    FROM linpha_photos, linpha_first_lev_album, linpha_stats
    WHERE linpha_photos.prev_path LIKE CONCAT( linpha_first_lev_album.path, '%' )
    AND 1 =1
    AND (
    linpha_photos.md5sum = linpha_stats.md5sum
    AND linpha_stats.type = 'view'
    AND linpha_stats.stats_time >= '0'
    AND linpha_stats.stats_time <= '9999999999'
    )
    GROUP BY linpha_stats.md5sum
    ORDER BY nr_count DESC , max_time DESC
    LIMIT 0 , 10;
    ---
    As a newbie I have no idea what to do.

    In linpha_stats are about 170.000 entries.
    Everything else runs like a charm, I#ve stores about 4.500 photos with LinPHA.

    Any hints?

    Klaus

     
    • bzrudi

      bzrudi - 2008-11-08

      Hi Klaus,

      I'm sorry, but there is nothing you can do. This is a known issue which can't be fixed in an easy way. Best disable all stats...

      cheers bzrudi

       

Log in to post a comment.