Slow database query - templates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • beano33
    Member
    • Jun 2003
    • 89

    Slow database query - templates

    Hey guys... Everything's working pretty good, except for one big problem... In the mysql slow query log, we're seeing a LOT of this:

    Code:
    # Query_time: 11  Lock_time: 0  Rows_sent: 0  Rows_examined: 0
    SELECT title, template
                            FROM template
                            WHERE templateid IN (54875,55124,54902,54903,54905,54912,54911,53334,55014,55001,55002,55004,55003,53338,0,53339,53340,53345,55011,55013,54814,54816,54818,54820,53333,55038,55041,55042,55039,54994,54993,54995,54999,54997,55071,54853,54854,51453,53349,53629,52761,54986,53331,54953,52703,55126,55135,54972,54973,54974,54975,55086,55140,55139,55141,53335,52300,53351,53613,53610,53611,53598,53633,53658,53656);
    I'm seeing it probably every second or so, and it's really bogging down the boards... I've done an EXPLAIN in mysql, and it's using the index... I've repaired, optimized, and analyzed the template table, all to no avail.

    Does anyone have any thoughts on this? I've done a lot of searching in google, on this board, etc, but the only thing that I've seen is people saying to re-upload the files in ascii mode... Which obviously isn't going to help a slow query.

    I've got memcached going, but unfortunately, that's only good for the datastore, it's not utilized in a query like this.

    I've also turned on the mysql query cache and set it so that I specified which queries were to use it, so that the query looked like this:

    Code:
    SELECT SQL_CACHE title, template
                            FROM template
                            WHERE templateid IN (54875,55124,54902,54903,54905,54912,54911,53334,55014,55001,55002,55004,55003,53338,0,53339,53340,53345,55011,55013,54814,54816,54818,54820,53333,55038,55041,55042,55039,54994,54993,54995,54999,54997,55071,54853,54854,51453,53349,53629,52761,54986,53331,54953,52703,55126,55135,54972,54973,54974,54975,55086,55140,55139,55141,53335,52300,53351,53613,53610,53611,53598,53633,53658,53656);
    To no avail, unfortunately. Looking at mysqlreport stats show that I'm hitting the query cache quite often, but it's not often enough, in my opinion.

    Anyhow, please let me know if anyone has any ideas on this... Even if I have to customize that one single query (and any updates/inserts on that table) to use memcached, I will... If anyone has any thoughts on doing this, please let me know, I'd love to do it!

    Any thoughts or help at all would be great.

    P.S. This problem only got this bad after we upgraded to 3.6.3 from 3.6.2
    Last edited by beano33; Tue 14 Nov '06, 9:36am.
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    I recommend you post a thread in the Server Configuration forum with the requested info. The people there can probably help you to tune things up.

    Comment

    • beano33
      Member
      • Jun 2003
      • 89

      #3
      Will do, thanks Jake.

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...