{"id":1986,"date":"2015-03-09T21:27:07","date_gmt":"2015-03-09T19:27:07","guid":{"rendered":"http:\/\/soci.hu\/blog\/?p=1986"},"modified":"2015-03-09T23:13:10","modified_gmt":"2015-03-09T21:13:10","slug":"sql-fejtoro-9-2","status":"publish","type":"post","link":"https:\/\/soci.hu\/blog\/index.php\/2015\/03\/09\/sql-fejtoro-9-2\/","title":{"rendered":"SQL fejt\u00f6r\u0151 10."},"content":{"rendered":"<p>Feladat: az al\u00e1bbi lek\u00e9rdez\u00e9s nagyon lassan fut le, n\u00e1lam a k\u00f6lts\u00e9ge SQL Server 2014 alatt 1145 sec. Hozz\u00e1 kellene \u00edrni a selecthez valamit, amit\u0151l a k\u00f6lts\u00e9ge leesik sokkal kisebbre.<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nUSE TempDB\r\nGO\r\n\r\nCREATE TABLE Table1 (A CHAR(5) NOT NULL)\r\nCREATE TABLE Table2 (B VARCHAR(1000) NOT NULL)\r\nGO\r\n\r\nINSERT Table1\r\nSELECT LEFT(AddressLine1, 5) AS A\r\nFROM AdventureWorks2014.Person.Address\r\n\r\nINSERT Table2\r\nSELECT AddressLine1 AS B\r\nFROM AdventureWorks2014.Person.Address\r\nGO\r\n\r\nSELECT *\r\nFROM Table1\r\nINNER JOIN Table2 ON\r\n    Table2.B LIKE Table1.A + '%'\r\n<\/pre>\n<p>A megfejt\u00e9seket szok\u00e1s szerint kommentben v\u00e1rom, amelyeket 4 nap m\u00falva engedek ki.<\/p>\n<p>A <a href=\"http:\/\/soci.hu\/TddCourse.aspx\">Test Driven Development tanfolyam<\/a> k\u00f6vetkez\u0151 felvon\u00e1sa \u00e1prilis 20-\u00e1n lesz, j\u00f6v\u0151 h\u00e9t szerd\u00e1ig m\u00e9g 25% kedvezm\u00e9nnyel lehet jelentkezni!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Feladat: az al\u00e1bbi lek\u00e9rdez\u00e9s nagyon lassan fut le, n\u00e1lam a k\u00f6lts\u00e9ge SQL Server 2014 alatt 1145 sec. Hozz\u00e1 kellene \u00edrni a selecthez&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,4,30,93],"tags":[],"class_list":["post-1986","post","type-post","status-publish","format-standard","hentry","category-adatbazisok","category-szakmai-elet","category-sql-server","category-teaser"],"_links":{"self":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1986","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=1986"}],"version-history":[{"count":2,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1986\/revisions"}],"predecessor-version":[{"id":1991,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1986\/revisions\/1991"}],"wp:attachment":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}