I am using Cloud Spanner as the database for my application. For certain queries the latency has spiked. I would like to know how can I debug it?
I tried looking at the system insights page but couldn't co-relate it with whats happening in my application.
The System Insights page has a lot of useful information. Check it for the problematic instance. Typically, high latency are caused by the following reasons:
Further latencies for requests may be high due to session misconfiguration on the client side. Client libraries uses sessions to run queries on cloud spanner and misconfiguration of sessions may cause high latency because creating a session is expensive, General guideline is to have min_sessions equal to maximum write QPS expected during the load for better latency numbers.