Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>display your "settings" from within the stored procedure and from just with SSMS. I have this same thing, faster in SSMS and slower in procedure. You can sometimes resolve this because SSMS is running with differeent settings than the procedure, get them same and you might be able to see the same performance in the procedure. Here is some example code to display the settings:</p> <pre><code>SELECT SESSIONPROPERTY ('ANSI_NULLS') --Specifies whether the SQL-92 compliant behavior of equals (=) and not equal to (&lt;&gt;) against null values is applied. --1 = ON --0 = OFF SELECT SESSIONPROPERTY ('ANSI_PADDING') --Controls the way the column stores values shorter than the defined size of the column, and the way the column stores values that have trailing blanks in character and binary data. --1 = ON --0 = OFF SELECT SESSIONPROPERTY ('ANSI_WARNINGS') --Specifies whether the SQL-92 standard behavior of raising error messages or warnings for certain conditions, including divide-by-zero and arithmetic overflow, is applied. --1 = ON --0 = OFF SELECT SESSIONPROPERTY ('ARITHABORT') -- Determines whether a query is ended when an overflow or a divide-by-zero error occurs during query execution. --1 = ON --0 = OFF SELECT SESSIONPROPERTY ('CONCAT_NULL_YIELDS_NULL') --Controls whether concatenation results are treated as null or empty string values. --1 = ON --0 = OFF SELECT SESSIONPROPERTY ('NUMERIC_ROUNDABORT') --Specifies whether error messages and warnings are generated when rounding in an expression causes a loss of precision. --1 = ON --0 = OFF SELECT SESSIONPROPERTY ('QUOTED_IDENTIFIER') --Specifies whether SQL-92 rules about how to use quotation marks to delimit identifiers and literal strings are to be followed. --1 = ON --0 = OFF </code></pre> <p>you can just add them to your result set::</p> <pre><code>SELECT col1, col2 ,SESSIONPROPERTY ('ARITHABORT') AS ARITHABORT ,SESSIONPROPERTY ('ANSI_WARNINGS') AS ANSI_WARNINGS ,SESSIONPROPERTY ('... FROM ... </code></pre> <p>if you ry them one at a time, try <code>ARITHABORT</code> first.</p> <p>see: <a href="https://stackoverflow.com/questions/4327610/resolving-an-ado-timeout-issue-in-vb6/4329645#4329645">Resolving an ADO timeout issue in VB6</a> and <a href="https://stackoverflow.com/q/2465887/65223">Why would SET ARITHABORT ON dramatically speed up a query?</a></p>
    singulars
    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.
 

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