1
votes

We've noticed that some of our queries have seen degraded performance in the last couple of weeks. We suspect this is due to some combination of:

  • Increased data in the tables
  • Increased data in some results
  • Inefficient or over-aggressive use of transactions

Any advice on how to diagnose the performance of a particular query?

1

1 Answers

1
votes

When running an interactive query against your database in the Google Cloud Platform online management console, you can request generation of a plan explanation with the tab below the 'Run Query' button. This explanation may help you understand why your query is running slowly.

One common reason for performance regressions is that you have recently deleted or updated a lot of data. It can take several days for deleted/overwritten data to be garbage-collected, and in the interim it can slow down operations since this old data must still be scanned for queries over its key-range.