I've recently upgraded my site from 4.65 to 5.1 with the necessary 4.7 upgrade in between. Since the upgrade, my site has become ridiculously slow. Pages take anywhere from 10 to 20 seconds to render. I'm running the same number of modules as before the upgrade and even if I strip them out the speediest a page will load is in about 7 seconds which is not really acceptable.
I'm no MySQL expert, but I have the feeling that something has gone awry with my database. I checked out the MySQL status report at /admin/logs/status/sql and see these values which I am hoping someone can help me decipher. My logs are set to clear out every 2 days so I'm not sure if these values are for the lifetime of my site or just the past 2 days. These values are supposed to be zero, but several of them are in the millions. That can't be good.
Select_full_join 1519808 The number of joins without an index; should be zero.
Select_range_check 1750 The number of joins without an index; should be zero.
Sort_scan 14349818 The number of sorts done without using an index; should be zero.
Qcache_lowmem_prunes 77871955 The number of times that MySQL had to remove queries from the cache because it ran out of memory. Ideally should be zero.
Is there a straightforward answer to this question? I'm trying to develop some PHP code (under Drupal 5.1) to list a series of node titles drawn from different databases, some of which are in version 4.6 still, and others in 4.7. I'm using the db_set_active() function to switch between databases. The titles are in several different languages that use "funny" characters. This all works fine, except for one thing: the results returned by db_query (the db_query is in Drupal 5.1) look fine if they come from a Drupal 4.7 database, but are all messed up if they come from Drupal 4.6.