Professional Web Applications Themes

Executiuon Time (repost) - Microsoft SQL / MS SQL Server

I think its because in QA you set values to input parameters, and SQL Server know how to optimize execution plan. In case of stored procedure, howewer, SQL Server have to create common execution plan without optimization for specific values of parameters.   I copy and paste  be wrong, I have  FREEPROCCACHE ...

  1. #1

    Default Executiuon Time (repost)

    I think its because in QA you set values to input
    parameters, and SQL Server know how to optimize execution
    plan. In case of stored procedure, howewer, SQL Server
    have to create common execution plan without optimization
    for specific values of parameters.
     
    I copy and paste 
    be wrong, I have 
    FREEPROCCACHE 
    andsm Guest

  2. #2

    Default Re: Executiuon Time (repost)

    DBCC FREEPROCCACHE clears execution plans from cache, not data. You might have the first run doing lots of physical I/O, and the second one (sp or not) getting most data from cache. To have both runs run in similar environments either both should run against clear cache (both execution plans and data), or both against warm cache depending on what you want to test.
    To clear the data from cache use DBCC DROPCLEANBUFFERS (don't use in production).

    Getting that out of the way, there are many things that could cause such problems. Here's a KB article you can start with:

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;224587

    --
    BG, SQL Server MVP
    Solid Quality Learning
    www.solidqualitylearning.com


    "Falik Sher" <com> wrote in message news:phx.gbl... 
    Itzik Guest

  3. #3

    Default Re: Executiuon Time (repost)

    Try updating statistics by running sp_updatestats. It helps the query
    optimizer to pick the right query plan.

    "Falik Sher" <com> wrote in message
    news:phx.gbl... 


    Anthony Guest

Similar Threads

  1. repost again :) sorry
    By MeTin in forum Dreamweaver AppDev
    Replies: 1
    Last Post: February 28th, 01:26 PM
  2. Repost: Getting Project Folder during Design Time
    By in forum ASP.NET Building Controls
    Replies: 1
    Last Post: August 2nd, 07:36 AM
  3. Formatting a time field to 24 hour time (Military time) in the Datagrid
    By David Hearn in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: September 10th, 02:50 PM
  4. Replies: 1
    Last Post: August 3rd, 06:12 PM
  5. Re (repost): Is this a bug?
    By Aryeh Friedman in forum Ruby
    Replies: 2
    Last Post: July 5th, 06:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139