Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I currently run a Windows Server with SQL Server Express. I'd like follow best practice and separate the application from the database, so I've created an RDS instance and exported my database.

But... it's painfully slow. I'm running a test query from my local machine that selects 12000 rows - it takes less than 1 second against my original setup but 16 seconds against RDS. Surely it can't be question of specification; my small RDS instance actually has a better spec. than my Windows Server.

What could be going on here?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Just a guess as there isn't enough information to really figure this out but it could be network latency. You're saying that local connection to local DB is fast but local to remote DB is slow. All other things being equal the only difference is the network connection between you (local) and the remote DB.

Generally AWS is pretty fast and has a stable network but you might notice latency issues for more chatty protocols. I'm not too familiar with the wire protocol for SQL Server but I know that Oracle for example is a relatively chatty protocol so it could be similar. As such you'll see much better performance when the network connection between the client and the server (the database) are on a low latency network with a minimal amount of hops.

Another issue could be if your local internet connection doesn't have much bandwidth (say a 1 Mb/s DSL) and you try streaming back a lot of rows from the remote database.

You should repeat your test from a Windows instance that's close to the RDS instance. I don't think you're allowed to remote into the RDS instance itself but you should be able to spin up a Windows instance that's in the same availability zone. That should be close enough to what it's like in a real world deployment.

Also, if you're planning on using the remote Amazon RDS instance as the database for an application that's not running on Amazon then you really need to test out the performance in advance. The intended use case is having your application running on EC2 so that you're on a low latency network with the DB. It would still work remotely but the performance will we wildly different.

share|improve this answer
    
To clarify, I wasn't accessing a local database at any point. Anyway - I created an EC2 instance in the same availability zone and from there, I'm now getting the performance I expected. Thank you. –  Jonathan Jul 28 '13 at 18:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.