title: Cloud SQL 2nd gen (5.7) very slow after Google Maintenance
body: <p>After google maintenance on my google cloud instance, on last Saturday night, access to the database from my GAE app is very slow... this is quite obvious on huge tables. Previously I had very good performance, and now terrible. Queries are 10 to 20x slower, which causes error 500 on the app side, after reaching 60s timeouts... also, instance processor is near 100% most of the time, where before was around 20%.</p>
  
  <p>Read/write operations are now insanely higher than before also...</p>
  
  <p>I've already checked table status, optimize relevant tables, drop and rebuild indexes, etc...</p>
  
  <p>It remains the same... can't get it done... actual instance version is 5.7.14-google (Google) - db-n1-standard-1</p>
  
  <p>When checking processes, I can see often these states: 'Sending data' and 'optimizing'... those processes are taking so much time, and are always related to count queries...</p>
  
  <p>For example:</p>
  
  <pre><code>| 298620 | root       | cloudsqlproxy~173.194.90.100 | db_name | Query   |    7 | Sending data | SELECT COUNT(*) AS `__count` FROM `sms_sms` 
  WHERE NOT ((`sms_sms`.`origin` = (`sms_sms`.`recipient`) |
  | 298636 | root       | cloudsqlproxy~74.125.93.164  | db_name | Query   |    8 | optimizing   | SELECT COUNT(*) AS `__count` FROM `sms_sms`
  </code></pre>
  
  <p>How to overcome this... it seems that is some problem with the last maintenance update, and I simply cannot do anything to solve this problem...</p>
  
  <p>Any help would be appreciated!</p>
  
  <p>Thanks</p>