I have setup an Azure SQL database. My goal to to evaluate it for use on a real project.
I have a simple query that is very slow.
select *
from table1 T1 join table2 T2
on T1 .T2_id = T2.id
On my laptop SQL Server this is sub-second but in azure it's 11 seconds.
Table1
has 6,643 rows and table2 has 12 rows.
The execution plan is identical on both SQL Servers.
If I just return a count(*)
it's sub-second in both places.
The execution plan contains a clustered index scan of Table1
's primary key which is 90% of the cost (in both environments). With the count(*)
, this scan is not in the plan.
I am using the basic 'service tier' but there is very little data I am the only user. This is a test, but I can't put anything into production with this performance.
Edit: I upgraded to Standard tier, with "S2 50 DTUS's" - the highest in standard tier. I am still having the problem.