AZURE simple database query 20x slower than on local machine

Given a simple query where UserSessions column ID is a primary key.:

UPDATE UserSessions SET PageViews = PageViews + 1, LastPageView = {0}, LastPage = {1}  WHERE ID = {2} 

When profiling on my local dev machine it takes ~0.5ms to execute this query, on the Azure deployment it's taking 10ms to execute!

There's a good chance I've not picked the correct Azure configuration (edit: or not expensive enough!). Currently SQL Server S0 Standard (10 DTUs) and App service plan S1 Standard

  • All metrics on these services are showing I'm well under the usage caps of CPU/Memory etc.
  • Site is being run privately where I'm the only traffic visiting.

Why are these basic queries running so slowly? I would like it to run as fast, or even faster than on my local machine!

Edit: Upscaled to premimum and the query dropped to 6ms, still 12x slower.

Replay

Category: sql server Time: 2016-07-28 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.128 (s). 12 q(s)