Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Slow IO read speeds for SQL queries

I'm experiencing really slow IO read times for simple index scans. I'm tracking the IO timing by using the `track_io_timing` flag. 

The cloud sql instance is quite beefy with 128gigs of ram, 32 vCPUs, SSD storage on an enterprise edition instance. 

I'm getting IO read speeds from 15 MB/s to 23 Mb/s (see photos below) . This seems super slow to me and If I run the same queries on a local docker instance I see read speeds of 230 MB/s. 

I have collected the stats using `EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON)` and (URL Removed by Staff)

However seq scans have much faster IO speeds reaching upto 1GB/s. 

What can cause such low read speeds? 

AbhinavOm_0-1717144764651.png

AbhinavOm_1-1717144800461.png

Thanks for any pointers.

3 2 440
2 REPLIES 2

Hello,

You are not alone 😉

I investigate a same behavior with a cloud sql instance (postgresql)

My instance is small than your, 10 vCPU, 40Go of rams, SSD storage on an entreprise edition.

But I'm seeing very slow read accesses to the disk.

Exemple with a read of 91525 pages for an index scan in 50832ms => rate of read ~14Mo/s

Its good to know that I'm not alone. its been driving me crazy why things are so slow on cloud sql.