简体   繁体   中英

Completion latency to copy a SQL Azure database?

I am wondering about how much times it takes to complete a database copy over SQL Azure. I am considering a scenario where :

  1. a single database is populated first, and then stay read-only.
  2. a set of copies are created.
  3. an embarrassingly task gets paralleled over each copy (read-only).
  4. copies are deleted to lower hosting cost.

Such a scenario makes sense if the database copy on SQL Azure is reasonably fast.

Does anyone has some information concerning the latency to complete a copy of an SQL Azure Database, maybe w/o of the GB size of the database (assuming that smaller DB get copied faster than big ones)?

Subsidiary question: if 10 copies of the DB are triggered at the same time, will it takes 10x more time to complete the 10th copy? or does SQL Azure support some level of parallelization for such an operation.

I have no empirical numbers for how long it takes to copy DBs of various sizes, but in my experience the time is usually minutes. For the DBs that I regularly work with which are less than 100MB I allow 5 minutes, but this is probably quite generous. I've occasionally copied larger databases and it doesn't seem to take much larger than that, I suspect a lot of the time is actually spent provisioning the new database rather than copying data.

I'm taking a guess at what would happen if you initiated multiple copies, but because of the SQL Azure infrastructure I'd be surprised if there was much of a slowdown if multiple copies were initiated at the same time.

I don't know how long you want the whole process to take, but I think it's basically a good idea. I'd highly recommend doing some of your own benchmarking though.

I've found it particularly slow. I just copied a tiny 3.45MB database, and it took in excess of 5 minutes. It started 6:42, finished 6:49.

This was just using the SQL command line create with copy. Eg:

CREATE DATABASE NewDB AS COPY OF OldDB;

I'm not sure what the deal was - whenever I went to check progress, it wasn't showing anything, then suddenly it was just done.

Eg:

SELECT * FROM sys.dm_database_copies c
JOIN sys.databases d ON c.database_id = d.database_id
WHERE databases.name = 'NewDB';

The percent_complete column was null each time I looked. I was actually concerned I'd done something wrong...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM