Performance/costs improvements from single SQL database to elastic scale

Hi there!
I already posted a previous question on whats the best way to setup a elastic scale architecture for our application(https://social.msdn.microsoft.com/Forums/azure/en-US/82fabac7-137b-46d6-a9f0-5e71e4bbc9eb/using-datadependent-routing-in-combination-with-membership-provider?forum=ssdsgetstarted).
The next thing we need to know before we can implement elastic scale is if this is really going to help us with our performance and costs where we experiencing problems at the moment.
Currently we have a single SQL database(p3 800 DTU's).
We have run queries against our database which can calculate the number of DTU's we need to get good performance for that database.
My questions are:
1.When we implement elastic scale, can we really improve our performance and can this lead to saving costs on SQL databases?
2. Is there maybe a way we can easily test this by running queries or setting up an environment  where we can see real differences in DTU's per Shard?
Thanks!

Hi Elmar,
If you're already hitting performance limits with your P3 database, other than upgrading to the
new V12 server for improved premium performance, that is the highest you can currently vertically scale.  Thus, it becomes advantageous to scale out to achieve better performance. 
A small caveat, my answers below are really contingent upon your workload, query patterns, and sharding scheme.
1.When we implement elastic scale, can we really improve our performance and can this lead to saving costs on SQL databases?
Absolutely.  If you look at the table below, you can see the ~Cost per DTU/month. For a P3 you are paying $4.65/DTU/month.  If you were to scale out, with the same number of DTUs on an S2, for example, you'd achieve an 67% savings on
cost for the same number of DTUs (800).  Please keep in mind that there are feature differences between Standard and Premium SKUs as well as total size (250GB vs 500GB) - these may or may not affect your application.
**Please note that S3 above is the preview price (50% off).
2. Is there maybe a way we can easily test this by running queries or setting up an environment  where we can see real differences in DTU's per Shard?
The available DTUs per shard is a constant value.  In principle, 800 DTUs on one P3 database is equivalent in performance capacity of 100 DTUs on eight P1s.  The test you want to perform is a comparison between your scale-up
solution versus a scale-out solution as perceived by both the database %DTUs consumed and the response time/throughput of your client application. 

Similar Messages

  • Generating next number from the SQL database using java

    Hi friends, I have a problem and need your help. I am working on a project about submitting claims form through the adobe PDF file and SQL database. I have problem working on a web service (written in java) that will generate the next Invoice Number from the SQL Database table. The field type for the column is text(var char). *Example: I first need to get into the table and search for the last Invoice number in the table and if the last invoice number in the table from the database is 3, i would want to generate the next number which is 4 and filled it up in the PDF file through web service that i am implementing. Can you all provide me some guidelines on how to implement this method in my web service?
    Thanks a lot. I need it by today. Hope someone can reply this as soon as possible.
    Lim89
    Edited by: LIM89 on Apr 2, 2008 7:10 PM

    far simpler to use a sequence generator, which most databases support.
    Suggested method to get the max value in the column is NOT secure, unless you lock the entire table for update before you do so, which is a severe performance penalty.

  • Formating numbers in a form after retrieving from an SQL database

    Hello everyone,
    I am using php to populate a form using numbers taken from an sql database.  I am having a hard time showing decimal places in those numbers.  The code I am using in the value section of the form is:
    value="<?php if (isset($_POST['unit_price_1'])) {
         echo htmlentities( $_POST['unit_price_1'], ENT_COMPAT, 'UTF-8');
         } else {
              echo htmlentities($row_getInvoice['unit_price_1'], ENT_COMPAT, 'UTF-8');
         } ?>" />
    This code rounds all numbers up and eliminates decimal places.  I am trying to show dollars and cents.
    How do I alter the code to accomplish what I want.
    Jeff

    Not sure what might come in your way here, so I just made the following simple test by using a static value rather than one which gets derived from a recordset (the source shouldn´t matter), and this works well for me without seeing the value altered in any way:
    <?php
    $value = "10.22";
    ?>
    <input type="text" name="whatever" value="<?php echo htmlentities($value, ENT_COMPAT, 'UTF-8'); ?>" />
    However,. for displaying numeric values you really don´t need to use  htmlentities/ENT_COMPAT etc etc -- that´s something you´d rather use for displaying textual contents containg special characters like umlauts and such.
    If all you need is to add some degree of protection by escaping special HTML characters (<, >, &, etc.), the function htmlspecialchars() will only be escaping just these characters and leave the rest "as is", whereas htmlentities() is notably more rigi, because this function will convert all applicable characters to HTML entities -- but again: at this point you´re just *displaying* some numeric value, that is, such security measures are pretty much pointless in this scenario, because there´s nothing to protect from ;-)
    Please test what happens when doing away with the htmlentities - thing.
    Cheers,
    Günter

  • Migrating from Azure SQL Database to SQL Server VM

    I'm looking for steps/documentation to migrate a database from Azure SQL Database to SQL Server VM in the cloud. I want to make an app whose data is initially hosted in the former. Due to a few reasons, I might have to migrate to SQL Server VM. I'd
    like to design the app such that ideally there is no downtime. Looking for guidance...

    You can create bacpac file from Azure SQL database and Restore this bacpac file into SQL Server VM or any other place.
    Please refer below URL for more details:
    http://blogs.msdn.com/b/mast/archive/2013/03/04/different-ways-to-backup-your-windows-azure-sql-database.aspx
    dharampal sikhwal

  • Display images from a SQL database

    I want to display images from a SQL database. The images are in a table under a specific column and are stored as a link to the image. How would I display the images from the column in LabVIEW?
    I'm using LabVIEW 2013 version 13 and SQL Server 2012
    Paul Power
    I have not lost my mind, it's backed up on a disk somewhere

    Hi PauldePaor,
    I hope you are well.
    Once you have pulled the data from the database into LabVIEW in a string form (or path), you can simply use the Read BMP File (Or jpg, png depending on the file type) VI.
    More information can be found here:
    http://digital.ni.com/public.nsf/allkb/02971A30F5D8FC6986256A0A004F11A0
    Kind Regards,
    Aidan H
    Applications Engineer
    National Instruments UK & Ireland

  • Is it possible to migrate WebCenter Portal data from a SQL database to an Oracle database?

    We have our WebCenter Portal applications set up using a SQL database. Now we're wanting to migrate to an Oracle database and I'm wondering if that is possible.

    Yes it should be possible though i have not tried it myself. You basically export a file from mds ( xml) and import it into oracle db.
    Thanks
    manish

  • How to use java to create an XML document from an SQL database?

    Hi,
    I'm a complete novice at XML and have only recently started programming in Java.
    I'm currently trying to develop a package in Java 1.1.8 which requires a set of very specifically formatted XML documents. These documents would need to be updated regularly by people with no knowledge of Java and I would like to make it as simple as possible.
    Since the data will already be in an SQL database, I thought it might be possible to generate the XML documents from the data using a small Java application, but I'm not too sure how to go about this or if this is even possible! Any help or pointers in the right direction would be very much appreciated.
    Louise

    Do you have the option of upgrading to a newer version of the JDK?
    JAXB does what you are wanting very easily. Also there are tools if you don't want to write your own. JAXB is available as early release on Sun's site as is the newest JDK. Otherwise, you have to design a factory and interface that will do this for you (which is what JAXB basically is in a very simplified view).

  • How can I map an image (JPEG) from the SQL database image string

    I saved the image into SQL database, see attachment (SaveImage2SQLDB.rar), while I have some trouble to retrieve the image. I also attached the vi which I used to convert the string to image. The string already has a value I obtained from the database. Can anyone tell me the reason why it didn't work.
    Thanks in advance.
    Jane
    LabVIEW 2012, VDM 2012
    Attachments:
    convertstringtoimage.vi ‏78 KB
    SaveImage2SQLDB.zip ‏27 KB

    Hi Jane,
    What exactly isn't happening correctly?  The conversion or the retrieval? 
    This discussion forum may be of some use: http://forums.ni.com/t5/LabVIEW/image-from-compressed-string/m-p/2207894
    Matt S.
    Industrial Communications Product Support Engineer
    National Instruments

  • Transfering data from External SQL database to BW

    Hi Experts,
         I am trying to extract data from an External SQL Database  in BW using      
         DB Connect.
        1. I have created a  DB Source System.
        2. Using this Source System I have generated a Datasoure.
           ( following all the naming conventions for Table Names and Field Names)
        Till this point everything is OK.
        Then I assign a Infosource and try to upload the data into PSA.
        The process is never complete and I am getting a message
       <i> <b>Request still running
        Diagnosis
        No errors could be found. The current process has probably not finished yet.
        System response
        The ALE inbox of the SAP BW is identical to the ALE outbox of the source
        system
        and/or
        the maximum wait time for this request has not yet run out
        and/or
        the batch job in the source system has not yet ended.
        Current status
        No Idocs arrived from the source system</b>.</i>
         please help me.
      thanks
      arshad

    please first tell me which wich user you connect and the exact name of your table/view: is it dbo.table?
    as I said, better create a user in your SQL, log with this user and create a view.
    in RSBDC select this view and generate datasource. Check if you see data.
    if yes, the load shouldn't fail.
    We came across the same issue: login with sa, accessing a dbo. object; seing the data in RSDBC but nothing loading...
    let me know
    Olivier.

  • Is it possible to load SWF files from an SQL database?

    Hi all, I am very new to flash (I am primarily a C'# developer!) and I have been asked to investigate the possibility of doing the following;
    Create an application that allows swf files to be uploaded and stored inside of a SQL database as binary data (Why a database is a long story!)
    Allow this binary data to be extracted via a http request to be dynamically loaded inside of a web page.
    Now the first part was easy. I have all of my swf's uploaded and stored inside of the database. I have code that can make a request for the binary and write it to the response, so far so good. Now this is where I am stuck.
    I thought I could dynamically load the swf binary data by creating a very basic swf that simply contains a movie clip holder and for now a simple loadMovie statement. My idea being that I can could provide a url for the loadMovie statement that returns the swf binary data. This is where I have ground to a halt.
    I can see the call being made from the swf, I can see the data being returned but I cannot get it to render. I remember seeing an article some time agao where someone stated that they had used this method with success but I cannot find now. Has anyone ever done anything like? Is it even possible? Am I missing something simple?
    I have tried to return both the raw binary data and also used response.write but to no avail. Can anyone help?

    You are possibly trying to load AS3 swf into an AS2 Container at least the use of loadMovie() points in that direction. Be sure to use AS3 and target at least Flash 9 in your Loader/Main.swf. Also the AS3 concept of how to load swfs  differs a lot from the old concept.
    Look into the docu:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Loader.ht ml
    But the biggest Problem seems to me -what you mentioned- that Loader needs a (defined) URLRepuest and since your swf files have no "real" URL and you surely don`t want to let the user directly write to your server, a workaround would be to write the BinaryStream with AIR-functionality to a local installlation directory and load it then from there.

  • Retrieve image from my sql database using jsp

    I want to retrieve image from my sql (blob type) & save it in given relative path in server .(using jsp and servlets)
    please give me some sample codes.

    PreparedStatement pst = null;
      ResultSet rs=null;
    pst = conn.prepareStatement("select image from imagedetails where imageid='"+imageid+"'");
    rs=pst.executeQuery();
    while(rs.next())
                                byte[] b=rs.getBytes("image");
                                FileOutputStream fos=new FileOutputStream("c://image.jpg");
                                fos.write(b);
                            } hi this the code to retrieve the image from DB and write to a file.

  • Displaying the ResultSet from and sql database into a java Table in the sam

    i seriously need help in displaying the contents of my sql database into a table im my java application when someone types a query into a field provided..
    thanks guys !!

    What kind of help do you need.
    Are you stuck at some point of your code?
    Is you code not working?
    Or do you want us to write the code?

  • How may i know wich data are deleted from my sql database.

    Im using sql server 2005 someone deleted some transaction from my database.In my database audit is not enable.
    How may i know wich data is deleted? plz help me.

    Hi,
    If there has been little or no activity since the deletion, then the out-of-the-box trace may be of help. Try running:
    DECLARE @path varchar(256)
    SELECT @path = path
    FROM sys.traces
    where id = 1
    SELECT *
    FROM fn_trace_gettable(@path, 1)
    [In addition to the out-of-the-box trace, there is also the less well-known 'black box' trace, which is useful for diagnosing intermittent server crashes.
    According to your description, there is a way that you can recover most of the missing data with the aid of Transaction Logs and LSNs (Log Sequence Numbers). Usually, if you know when your data was deleted then the challenge to recover the deleted data is
    not as difficult. But, if you do not know the date and time when the data was deleted, then we will have to find a different way of identifying the data. For more information, there are steps about recovering deleted data in SQL Server, you can review them.
    http://sqlbak.com/blog/recover-deleted-data-in-sql-server/
    In addition, there are steps about know who and when deleted the data.
    http://raresql.com/2012/10/24/sql-server-how-to-find-who-deleted-what-records-at-what-time/
    Regards,
    Girish Prajwal

  • Reading/Writing Data from a SQL Database

    Hi,
    I have a data structure called 'Quote' which contains a number of different variables and controls ranging from text boxes, check boxes and radio buttons, i need to be able to read and write this from a database.
    First I think a description of my overall project is needed:
    Project Description
    I have been given a brief that basically says: i have to create a programmed solution in VB to solve a problem. This problem can be anything we like, and I personally have chosen to create a program that manages quotes for building Log Cabins (this is very contrived and far from anything someone would do in the real world).
    My solution will allow a generic user to create a quote (using a form with controls such as text boxes, check boxes, radio buttons) , and then save this to file. These users may then wish to load/edit this quote at a later date, from another form.
    Whilst completing this project, i'll only have up to about 5 records (quotes) within the system, so i dont need the ability to store hundreds of records. And each record will be relatively short, with only about 10-15 data items within the data structure.
    Also the Admin (or business owner in this case) need to be able to view all saved quotes in a presentable format, and edit them if needs be, from within this same program.
    This solution does not need to be absolutely perfect and 100% efficiently coded, or have all the bells and whistles a real-world program would have. This is for an A level computing project by the way.
    So basically, i need to be able to read from the database (to populate a Data Grid (i imagine this is best way?)) and so Admin can access any quote and edit it (editing is not vital, but viewing/printing is. Maybe i should stop at just viewing any quote?). Also i need generic users to be able to fill in the Edit Quote form and then save this data into the database.
    And is a data structure really required for me to use a database?
    I've never used databases in VB before (but have used them elsewhere, mainly Access) and so am completely new to this. Any help will be much appreciated.
    Thanks

    this is just a dataset i created using the dataset designer.
    OK, so i have the dataset called "MyDataSet".
    I also have the following variables:
    Code Snippet
    Dim FloorSpace As Int32
    Dim NoOfBedrooms As Int32
    Dim NoOfBathrooms As Int32
    Dim EnSuites As Int32
    Dim LuxKitchen As Boolean
    Dim LuxCabin As Boolean
    Dim Flooring As Boolean
    Dim VoiceLighting As Boolean
    Dim SolarPanels As Boolean
    Dim IntegralSound As Boolean
    Dim WindowFrames As String
    Each of which relates directly to a column in the dataset (data type matches too).
    What i need to do now, is to save these variables as an additional record in MyDataSet. And then save MyDataSet to file, so it can be loaded again next time the program is run and more additional records added. (all files are local by the way).
    how would i go about this?

  • Problem displaying results from a SQL database

    Hey everyone,
    So I am basically fairly new to coding, i am doing a tutorial i found on the web and trying to implement into my own. I have gotten so far in it and now have struck a problem, when i search for a item in a database it wont find it and a previous problem i had was that it was displayin all the records instead of the searched records. Anyway here is my code and i would greatly appreciate any help as i am stuck on it for weeks now trying to change is around and its really disheartening. P.S. The link to the tutorial if its any help is:http://www.sebastiansulinski.co.uk/web_design_tutorials/tutorial/9/link_exchange_system_wi th_dreamweaver_cs3
    Thanks
    Frank
    <?php require_once('../Connections/cbdb.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $maxRows_rsStock = 20;
    $pageNum_rsStock = 0;
    if (isset($_GET['pageNum_rsStock'])) {
      $pageNum_rsStock = $_GET['pageNum_rsStock'];
    $startRow_rsStock = $pageNum_rsStock * $maxRows_rsStock;
    mysql_select_db($database_cbdb, $cbdb);
    // Search engine functionality
    if ($_GET['make'] || $_GET['model']) {
    $key = $_GET['make'];
    $categ = $_GET['model'];
    $query_rsStock = "SELECT * FROM stock WHERE stock.model LIKE '%$make%' AND stock.model LIKE '%$model%' ORDER BY stock.date DESC";
    } else {
    $query_rsStock = "SELECT * FROM stock ORDER BY date DESC";
    $query_limit_rsStock = sprintf("%s LIMIT %d, %d", $query_rsStock, $startRow_rsStock, $maxRows_rsStock);
    $rsStock = mysql_query($query_limit_rsStock, $cbdb) or die(mysql_error());
    $row_rsStock = mysql_fetch_assoc($rsStock);
    if (isset($_GET['totalRows_rsStock'])) {
      $totalRows_rsStock = $_GET['totalRows_rsStock'];
    } else {
      $all_rsStock = mysql_query($query_rsStock);
      $totalRows_rsStock = mysql_num_rows($all_rsStock);
    $totalPages_rsStock = ceil($totalRows_rsStock/$maxRows_rsStock)-1;
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/admin.dwt.php" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <!-- InstanceEndEditable -->
    <link href="../style/admin_style.css" rel="stylesheet" type="text/css" media="screen" />
    <!-- InstanceBeginEditable name="head" --><title>Stock List</title>
    <script type="text/javascript">
    function tmt_confirm(msg){
    document.MM_returnValue=(confirm(unescape(msg)));
    </script>
    <!-- InstanceEndEditable -->
    </head>
    <body>
    <div id="wrapper">
    <div id="header"><p>Admin</p></div>
    <div id="navigation">
    <ul id="mainav">
    <li><a href="stock_list.php">List of stock</a></li>
    <li><a href="stock_add.php">Add new stock</a></li>
    <li><a href="make_add.php">Makes</a></li>
    <li><a href="logout.php">Logout</a></li>
    <li id="front"><a href="C:\xampp\htdocs\CarBreakers" target="_blank">front</a></li>
    </ul>
    </div>
    <div id="container"><!-- InstanceBeginEditable name="Content" -->
      <p id="ptitle">Stock</p>
      <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get" id="forminsert">
      <table border="0" cellspacing="0" cellpadding="0" id="tblinsert">
      <caption>
        Search for Stock
      </caption>
      <tr>
        <th><label for="keyword">Make:</label></th>
        <td><input type="text" name="make" id="make" /></td>
        <th><label for="model">Model:</label></th>
        <td><input type="text" name="model" id="model" /></td>
        <td><input type="submit" id="button" value="Submit" /></td>
      </tr>
    </table>
      </form>
      <?php if ($totalRows_rsStock > 0) { // Show if recordset not empty ?>
          <?php if ($totalRows_rsStock == 0) { // Show if recordset empty ?>
      <p>Sorry, there are no records matching your searching criteria.</p>
      <?php } // Show if recordset empty ?>
    <table border="0" cellpadding="0" cellspacing="0" id="tblrepeat">
        <tr>
          <th width="63" scope="col">Make</th>
          <th width="67" scope="col">Model</th>
          <th width="59" scope="col">Year</th>
          <th width="79" scope="col">Engine cc</th>
          <th width="56" scope="col">Fuel</th>
          <th width="59" scope="col">Doors</th>
          <th width="56" scope="col">Body</th>
          <th width="104" scope="col">Arrival Date</th>
          <th width="51" scope="col">Edit</th>
          <th width="83" scope="col">Remove</th>
        </tr>
        <?php do { ?>
          <tr>
            <td><?php echo $row_rsStock['make']; ?></td>
            <td><?php echo $row_rsStock['model']; ?></td>
            <td><?php echo $row_rsStock['year']; ?></td>
            <td><?php echo $row_rsStock['cc']; ?></td>
            <td><?php echo $row_rsStock['fuel']; ?></td>
            <td><?php echo $row_rsStock['doors']; ?></td>
            <td><?php echo $row_rsStock['body']; ?></td>
            <td><?php echo $row_rsStock['date']; ?></td>
            <td><a href="stock_edit.php?id=<?php echo $row_rsStock['stockId']; ?>">Edit</a></td>
            <td><a href="stock_remove.php?id=<?php echo $row_rsStock['stockId']; ?>" onclick="tmt_confirm('Are%20you%20sure%20you%20want%20to%20perform%20this%20action?');ret urn document.MM_returnValue">Remove</a></td>
          </tr>
          <?php } while ($row_rsStock = mysql_fetch_assoc($rsStock)); ?>
    </table>
      <?php } // Show if recordset not empty ?>
    <!-- InstanceEndEditable --></div>
    <div id="footer"><p>© <a href="http://www.blablabla.com/" title="Web Designer" target="_blank">Web Design</a></p></div>
    </div>
    </body>
    <!-- InstanceEnd --></html>
    <?php
    mysql_free_result($rsStock);
    ?>

    In your code, you have this -
    // Search engine functionality
    if ($_GET['make'] || $_GET['model']) {
    $key = $_GET['make'];
    $categ = $_GET['model'];
    $query_rsStock = "SELECT * FROM stock WHERE stock.model LIKE '%$make%' AND stock.model LIKE '%$model%' ORDER BY stock.date DESC";
    } else {
    $query_rsStock = "SELECT * FROM stock ORDER BY date DESC";
    The "else" part of the "if" block is what is selecting ALL the records -
    $query_rsStock = "SELECT * FROM stock ORDER BY date DESC";
    This means that the "if" part of the "if" block is always failing.  When does it fail?  Whenever you have not passed a URL variable for either "make" or "model".  Are you sure you are correctly passing that variable?

Maybe you are looking for

  • Which 3rd party apps support Apple Digital AV Adapter?

    I'm trying to find a list of which apps support video out through the Apple Digital AV Adapter. (I'm using an iPhone 4, so there's no mirroring function.) I was delighted to discover that I could stream 720p video to the living room TV using Home Sha

  • Can someone help me with wood grain?

    I am a basic CS3 user and I don't know how to work with gradients. I am building a flyer for the NCAA and I need a hard wood floor. I found a free one, but the planks are horizontal. When I try to rotate the image 90 degrees the planks are still hori

  • How to find LST file ,which is used in forms 6i

    hi all, can anyone tell me how to find the LST file in a form, i am calling one main LST file ,which fires when iwordpad pops up.. and when the wprdpad pops up ,it is saying that data not found in the data source ... so wanted to check that LST file

  • How can I disable the mouse pad? I prefer to use a mouse.

    The pad is particularly a nuisance when I try to type, perhps I catch it with my wrists, I don't know. I'd rather use a mouse.

  • 128 GB limit Hard Drive - All the same but different

    I'm currently replacing a dead drive with a Western Digital Blue 500gb in a G4 2X500. The drive is only reading 128 GB. Normally the answer to the question is you need a card. My issue: I have another drive attached to a card that's reading 500 gb it