Cloud SQL is slow (?)

307 views
Skip to first unread message

Andrew

unread,
Sep 9, 2013, 12:11:12 PM9/9/13
to google-cloud...@googlegroups.com
I have Cloud SQL D32 instance (the largest one) and it takes 30 ms to query a table with two records. Querying table with 500 records takes 75 ms. Execution time is reported by web SQL Prompt (judging by a screenshot listed below it's the time taken by DB server to execute query and not the whole roundtrip). I think it's unreasonable. Amazon RDS performs all these operations in less than 1 ms. Does anyone have any ideas why it might be? Or what am I missing?

Here's a screenshot: http://grab.by/q044

Joe Faith

unread,
Sep 9, 2013, 12:32:03 PM9/9/13
to google-cloud...@googlegroups.com
Hi Andrew

The SQL Console is intended for simple admin and reporting functions and is not intended for production loads.
If you are connecting from a GAE application you should expect latencies around 1ms.

J


On Mon, Sep 9, 2013 at 9:11 AM, Andrew <andr...@gmail.com> wrote:
I have Cloud SQL D32 instance (the largest one) and it takes 30 ms to query a table with two records. Querying table with 500 records takes 75 ms. Execution time is reported by web SQL Prompt (judging by a screenshot listed below it's the time taken by DB server to execute query and not the whole roundtrip). I think it's unreasonable. Amazon RDS performs all these operations in less than 1 ms. Does anyone have any ideas why it might be? Or what am I missing?

Here's a screenshot: http://grab.by/q044

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/790b1b65-7f0c-4242-9495-63b06ed2dd07%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Joe Faith | Product Manager | Google Cloud

Andrew

unread,
Sep 10, 2013, 1:28:55 PM9/10/13
to google-cloud...@googlegroups.com
Hi, Joe!

Following your advice, I surrounded a piece of code that sends a single DB request to select 500 records from a view with a stopwatch. I've gathered timings in a spreadsheet for you to look at. It's really confusing and I might be missing something, but I don't see latencies that are comparable to my dev box. Performances doesn't increase starting from D2 instance size and average query time is 80 ms. Whereas on my dev box it's 16 ms average.

My application is written in PHP and deployed to GAE.

Please let me know if you need any other details.

Andrew

On Monday, 9 September 2013 19:32:03 UTC+3, Joe Faith wrote:
Hi Andrew

The SQL Console is intended for simple admin and reporting functions and is not intended for production loads.
If you are connecting from a GAE application you should expect latencies around 1ms.

J
On Mon, Sep 9, 2013 at 9:11 AM, Andrew <andr...@gmail.com> wrote:
I have Cloud SQL D32 instance (the largest one) and it takes 30 ms to query a table with two records. Querying table with 500 records takes 75 ms. Execution time is reported by web SQL Prompt (judging by a screenshot listed below it's the time taken by DB server to execute query and not the whole roundtrip). I think it's unreasonable. Amazon RDS performs all these operations in less than 1 ms. Does anyone have any ideas why it might be? Or what am I missing?

Here's a screenshot: http://grab.by/q044

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.

Andrew

unread,
Sep 10, 2013, 1:29:58 PM9/10/13
to google-cloud...@googlegroups.com
Forgot to mention that timings are in ms.

Joe Faith

unread,
Sep 10, 2013, 1:44:28 PM9/10/13
to google-cloud...@googlegroups.com
Hi Andrew

Thanks for chasing this up.
Latencies for a cloud hosted DB will never be as low as a mysql instance running on the same machine as your application, as is the case with your dev box.
You're also getting better performance with larger instances (with more CPU and RAM), which is to be expected.

I'd also like to do a deeper dive on this -- I'll respond off-thread

j



To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/b1b91343-53f2-463a-9924-ef4b32a55ff1%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages