Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well, I don't have a direct answer but here is how I would approach the problem. </p> <ol> <li>Identify who is causing the problem. The first step would be to run SQL profiler and see if the database is at issue or it's something in the code.</li> </ol> <p><strong>SQL</strong></p> <p>If it's the database then I would look at a few things: everyone is harping on string concatenation issues which while true will likely make up less than 5 ms of your timing. I also would discount the spaces as being the source of the issue. Again it will make a small difference but will not account for the degredation that you describe. You're looking for something that will have this progression (0.5, 1.1, 3.3).</p> <p>I would look in particular at what indexes you've defined on this table, what constraints/ triggers are on this table, and how many foreign key relationships are present. Additionally I would pull out the queries that are executing slowly and run them in query manager (sql enterprise manager). </p> <p>The final thing I might investigate is whether there is a bad cache plan introducing issues with some data dependant feature. This would only be valid if you had some interesting triggers that use a piece of your data or certain types of index updates. You can look at this by calling DBCC FREEPROCCACHE in between calls to your insert statement and see if it makes a difference. This command will clear the plan cache forcing sql to regenerate a new execution plan for your query.</p> <p><strong>Client</strong></p> <p>If it is the client then you need to determine what in your code is causing the issue. If you have a performance tracing tool (like visual studio performance analyzer) which will instrument your code I would use that as it will <em>VERY</em> quickly tell you precisely what is taking up so much time.</p> <p>If you don't have that option then start by pulling out your code into a new console app with the smallest possible set of contingencies and see if you can repro the behavior. You're looking for whatever might be the cause of the progression you're seeing.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload