{"id":4122,"date":"2010-02-03T23:36:00","date_gmt":"2010-02-03T22:36:00","guid":{"rendered":"http:\/\/www.glorf.it\/blog\/?p=4122"},"modified":"2010-02-04T22:00:11","modified_gmt":"2010-02-04T21:00:11","slug":"trace-auswerten-sp_cursoropen-2","status":"publish","type":"post","link":"http:\/\/www.glorf.it\/blog\/2010\/02\/03\/sql-talk\/sql-server\/trace-auswerten-sp_cursoropen-2","title":{"rendered":"Trace auswerten: sp_cursoropen"},"content":{"rendered":"<p>Auf <a href=\"http:\/\/jtds.sourceforge.net\/apiCursors.html#_sp_cursoropen\">sourceforge.net<\/a> findet man eine Doku von sp_cursoropen. Das ist besonders dann interessant, wenn man in einem Profiler-Trace ein sp_cursoropen findet und sich fragt, was denn da wohl f&#252;r ein Cursortyp dahinter steckt. <\/p>\n<table>\n<tr VALIGN=\"top\">\n        <TH>Hex-Wert<\/TH><br \/>\n        <TH>Cursortyp<\/TH><br \/>\n      <\/tr>\n<tr VALIGN=\"top\">\n<td>0x0001<\/td>\n<td>Keyset-driven cursor.<\/td>\n<\/tr>\n<tr VALIGN=\"top\">\n<td>0x0002<\/td>\n<td>Dynamic cursor.<\/td>\n<\/tr>\n<tr VALIGN=\"top\">\n<td>0x0004<\/td>\n<td>Forward-only cursor.<\/td>\n<\/tr>\n<tr VALIGN=\"top\">\n<td>0x0008<\/td>\n<td>Static cursor.<\/td>\n<\/tr>\n<tr VALIGN=\"top\">\n<td>0x0010<\/td>\n<td>Fast forward-only cursor.<\/td>\n<\/tr>\n<tr VALIGN=\"top\">\n<td>0x1000<\/td>\n<td>Parameterized query.<\/td>\n<\/tr>\n<tr VALIGN=\"top\">\n<td>0x2000<\/td>\n<td>Auto fetch.<\/td>\n<\/tr>\n<tr VALIGN=\"top\">\n<td>0x4000<\/td>\n<td>Auto close.<\/td>\n<\/tr>\n<tr VALIGN=\"top\">\n<td>0x8000<\/td>\n<td>Check acceptable types.<\/td>\n<\/tr>\n<tr VALIGN=\"top\">\n<td>0x10000<\/td>\n<td>Keyset-driven acceptable.<\/td>\n<\/tr>\n<tr VALIGN=\"top\">\n<td>0x20000<\/td>\n<td>Dynamic acceptable.<\/td>\n<\/tr>\n<tr VALIGN=\"top\">\n<td>0x40000<\/td>\n<td>Forward-only acceptable.<\/td>\n<\/tr>\n<tr VALIGN=\"top\">\n<td>0x80000<\/td>\n<td>Static acceptable.<\/td>\n<\/tr>\n<tr VALIGN=\"top\">\n<td>0x100000<\/td>\n<td>Fast forward-only acceptable.<\/td>\n<\/tr>\n<\/table>\n<p>Das bedeutet beispielsweise, dass eine 16 im dritten Parameter (@scrollopt) auf den Cursortypen &quot;<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms187502.aspx\">Fast forward-only cursor<\/a>&quot; hinweist, was dem &quot;<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms187602.aspx\">Default Result Set<\/a>&quot; bzw. &quot;Firehose Cursor&quot; entspricht. Das ist dann der Idealfall. Alle anderen Cursortypen sind langsamer, wenn nur das Lesen der Daten im Vordergrund steht.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Auf sourceforge.net findet man eine Doku von sp_cursoropen. Das ist besonders dann interessant, wenn man in einem Profiler-Trace ein sp_cursoropen findet und sich fragt, was denn da wohl f&#252;r ein Cursortyp dahinter steckt. Hex-Wert Cursortyp 0x0001 Keyset-driven cursor. 0x0002 Dynamic cursor. 0x0004 Forward-only cursor. 0x0008 Static cursor. 0x0010 Fast forward-only cursor. 0x1000 Parameterized query. 0x2000 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[670,671,929],"_links":{"self":[{"href":"http:\/\/www.glorf.it\/blog\/wp-json\/wp\/v2\/posts\/4122"}],"collection":[{"href":"http:\/\/www.glorf.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.glorf.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.glorf.it\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.glorf.it\/blog\/wp-json\/wp\/v2\/comments?post=4122"}],"version-history":[{"count":6,"href":"http:\/\/www.glorf.it\/blog\/wp-json\/wp\/v2\/posts\/4122\/revisions"}],"predecessor-version":[{"id":4137,"href":"http:\/\/www.glorf.it\/blog\/wp-json\/wp\/v2\/posts\/4122\/revisions\/4137"}],"wp:attachment":[{"href":"http:\/\/www.glorf.it\/blog\/wp-json\/wp\/v2\/media?parent=4122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.glorf.it\/blog\/wp-json\/wp\/v2\/categories?post=4122"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.glorf.it\/blog\/wp-json\/wp\/v2\/tags?post=4122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}