답변됨 sys.database_usage.quantity = 1.8?

  • Friday, May 25, 2012 3:51 PM
     
     

    I have 1 database in 1 server in 1 subscription. I don't create and drop databases on-the-fly (actually, at all). The documentation of the 'quantity' column of sys.database_usage says "The maximum number of databases of an SKU type that existed during that day". Not average number! Maximum. How can it be non-integer?

    SELECT * FROM sys.database_usage

    time        sku    quantity
    ...
    2012-05-22  Web   1.8
    2012-05-23  Web   1.8
    2012-05-24  Web   1.8

    Why is 'quantity' a non-integer number?

    In fact, I have been billed for 1.7936 "database units" during the last month, while in fact I always had exactly 1 database (of changing size 2GB - 3.5GB). I can see that the average of the numbers in sys.database_usage.quantity is around 1.7936 for the given period (actually 1.8533) because those numbers are 1.8, 1.4, 2.2, 2.6 -- never an integer.

    Can somebody explain it to me?

    Another (related) question. The invoice contains two items: "Data Transfer Out (GB)" (it's ok) and "Database Units" (the above-mentioned 1.7936). How does the unit price ("Rate", £6.0549≈$9.99) reflect the Flat $9.99 for the first 1GB and $3.996 per GB? I think these should be two items in the invoice..

All Replies

  • Friday, May 25, 2012 4:44 PM
     
     Answered

    OK, I got it.

    $3.996/$9.99 = 0.4

    This is why I see 1+n*0.4 values in sys.database_usage.quantity. n is the number of GBs the database occupied above the first GB (= the base amount that is included in the flat price). If I had business edition with MAXSIZE > 10GB then quantity=1.0 would mean 10GB, and an actual size of 10+nGB would be seen as quantity = ($45.954 + n*$1.998)/$45.954 ≈ 1+n*0.04348.

    Sorry for taking your time. (Nevertheless, it was useful because all existing documentation on this topic is far from being clear...)

    Please post here a link to the official documentation that explains it, if you are aware of one...

  • Sunday, May 27, 2012 2:35 PM
    Moderator
     
     
    Thank you for sharing experiences

    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework