{"id":361,"date":"2007-12-13T19:54:26","date_gmt":"2007-12-13T18:54:26","guid":{"rendered":"http:\/\/soci.hu\/blog\/index.php\/2007\/12\/13\/tapasztaltok-egy-35ezer-tranzakciomp-es-rendszer-implementaciojabol\/"},"modified":"2007-12-13T19:54:26","modified_gmt":"2007-12-13T18:54:26","slug":"tapasztaltok-egy-35ezer-tranzakciomp-es-rendszer-implementaciojabol","status":"publish","type":"post","link":"https:\/\/soci.hu\/blog\/index.php\/2007\/12\/13\/tapasztaltok-egy-35ezer-tranzakciomp-es-rendszer-implementaciojabol\/","title":{"rendered":"Tapasztaltok egy 35ezer tranzakci\u00f3\/mp-es rendszer implement\u00e1ci\u00f3j\u00e1b\u00f3l"},"content":{"rendered":"<p>Na, nem \u00e9n csin\u00e1ltam, sajnos n\u00e1lunk nem nagyon van ilyen, b\u00e1r, ha tudtok r\u00f3la, jelezz\u00e9tek. Mobilosokn\u00e1l tal\u00e1n van valami hasonl\u00f3 terhelts\u00e9g\u0171 db, de az Oracle.<\/p>\n<p>Sz\u00f3val, <a href=\"http:\/\/sqlblog.com\/blogs\/paul_nielsen\/archive\/2007\/12\/12\/10-lessons-from-35k-tps.aspx\">nagyon-nagyon j\u00f3 post<\/a> a t\u00e9m\u00e1ban, p\u00e1r meglep\u0151 fordulattal, pl.<\/p>\n<p>N\u00e9ha nem a legszebb megold\u00e1s a legjobb:<br \/>\n&#8220;When developing the upsert proc prior to tuning the indexes, I first trusted that the If Exists(Select\u2026) line would fire for any item and would prohibit duplicates. Nada. In a short time there were thousands of duplicates because the same item would hit the upsert at the same millisecond and both transactions would see a not exists and perform the insert. After much testing the solution was to use the unique index, catch the error, and retry allowing the transaction to see the row and perform an update instead an insert.&#8221;<\/p>\n<p>A CLR implement\u00e1ci\u00f3 buk\u00e1sa, tal\u00e1n az interop k\u00f6lts\u00e9gek miatt?<\/p>\n<p>&#8220;This app requires that several hundred \u201citems\u201d are passed into the stored procedure for processing as a set. I chose to input the data as comma delimited VarChar(max), originally using Erland\u2019s iterative string2set function to parse string into a set inside the proc. It worked well enough. The plan was to substitute a CLR function near the end of development. When the time came, the CLR function ran blazingly fast on my notebook, but under stress it was painfully sloooooow. I didn\u2019t understand at all why. This is exactly what we were told by Microsoft the CLR was for. Pass string data in, manipulate it, pass it back \u2013 no data access \u2013 sounds great right? In a few emails to my friend Adam, he told me he had the same issues a while back and the CLR simply could keep up with the marshalling of the VarChar(max).&#8221;<\/p>\n<p>Stb. Nagyon j\u00f3 cikk.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Na, nem \u00e9n csin\u00e1ltam, sajnos n\u00e1lunk nem nagyon van ilyen, b\u00e1r, ha tudtok r\u00f3la, jelezz\u00e9tek. Mobilosokn\u00e1l tal\u00e1n van valami hasonl\u00f3 terhelts\u00e9g\u0171 db,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,25,6,4,21],"tags":[],"class_list":["post-361","post","type-post","status-publish","format-standard","hentry","category-net","category-adonet","category-adatbazisok","category-szakmai-elet","category-sql-server-2005"],"_links":{"self":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=361"}],"version-history":[{"count":0,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/361\/revisions"}],"wp:attachment":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}