{"id":501765,"date":"2026-11-05T14:09:09","date_gmt":"2026-11-05T11:09:09","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=501765"},"modified":"2026-11-05T14:09:09","modified_gmt":"2026-11-05T11:09:09","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=501765","title":{"rendered":"\u0420\u0435\u0433\u0438\u0441\u0442\u0440 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438, \u0438\u0442\u043e\u0433\u0438 \u0438 \u0431\u043e\u043b\u044c \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u043c\u0435\u0441\u044f\u0446\u0430: \u0440\u0430\u0437\u0431\u043e\u0440 \u043a\u0435\u0439\u0441\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u044f\u0440\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0441\u0443\u0431\u0434 \u0441\u0438\u043b\u044c\u043d\u043e \u0434\u0435\u0433\u0440\u0430\u0434\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 mssql \u043d\u0430 postgresql.<\/p>\n<h2>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/h2>\n<p>\u041a \u043d\u0430\u043c \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442: \u043f\u043e\u0441\u043b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 MS SQL \u043d\u0430 Tantor Postgres 17 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043c\u0435\u0441\u044f\u0446\u0430 \u0432 1\u0421:ERP \u0441\u0442\u0430\u043b\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c 8 \u0447\u0430\u0441\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u043e 12 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Tantor Postgres, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u043b\u0438 \u043d\u0430\u0448\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043f\u043e\u0434 1\u0421. \u0421 \u043d\u0438\u043c\u0438 \u0431\u044b\u043b\u043e \u0432\u0441\u0435 \u043e\u043a, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e \u043d\u0438\u043c \u043c\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 auto_explain \u0441\u043e \u0441\u0431\u043e\u0440\u043e\u043c \u043f\u043b\u0430\u043d\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u043e\u043b\u0435\u0435 5 \u0441\u0435\u043a. \u0415\u0441\u043b\u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043c\u0435\u0441\u044f\u0446\u0430 \u0442\u043e\u0440\u043c\u043e\u0437\u0438\u0442 \u0438\u0437-\u0437\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043e\u043d\u0438 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043b\u043e\u0433\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u043b\u043e\u0433\u0438 \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437 \u043b\u043e\u0433\u043e\u0432 \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u043f\u043e\u0447\u0442\u0438 8 \u0447\u0430\u0441\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u043e\u0441\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0442\u043e\u0433\u043e\u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438: \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e2, \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e3. \u0412\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u043c\u0435\u043b\u0438 2 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c\u00a0<a href=\"https:\/\/explain.tensor.ru\/archive\/explain\/227b211a54254047d8d9b27046b39016:0:2026-05-15\">\u043f\u043b\u0430\u043d<\/a> \u0442\u0430\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/e1\/8c\/c4\/e18cc435259fe9423f764d298466ee62.png\" width=\"1652\" height=\"513\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/e1\/8c\/c4\/e18cc435259fe9423f764d298466ee62.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/e1\/8c\/c4\/e18cc435259fe9423f764d298466ee62.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0435\u0433\u043e:<\/p>\n<ol>\n<li>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (1), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438\u0442\u043e\u0433\u043e\u0432. \u0412\u0441\u0435\u0433\u043e 194 040 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 (2)<\/p>\n<\/li>\n<li>\n<p>\u0418\u0434\u0435\u0442 \u043b\u0435\u0432\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0438\u0442\u043e\u0433\u043e\u0432 \u043f\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0443, \u0441\u0447\u0435\u0442\u0443, \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e \u0441 \u0446\u0435\u043b\u044c\u044e \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0442\u044c\u00a0\u0442\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u0442\u043e\u0433\u043e\u0432 (\u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438\u0442\u043e\u0433\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 2\u0445 \u044d\u0442\u0430\u043f\u043e\u0432, \u043e \u043d\u0438\u0445 \u043d\u0438\u0436\u0435). \u0423\u0441\u043b\u043e\u0432\u0438\u0435 WHERE T2._Period IS NULL \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u0442\u043e\u0433\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0438\u0441\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u0442\u043e\u0433\u043e\u0432 \u0438\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 <em>accrgat351203<\/em>1o (3). \u041d\u043e \u043d\u0435 \u0432\u0441\u0435 \u043f\u043e\u043b\u044f, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0438\u0434\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 2\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0435\u0441\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e Filter (4), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435. \u0418 \u0437\u0430 \u043e\u0434\u0438\u043d \u0446\u0438\u043a\u043b \u043f\u043e\u0438\u0441\u043a \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f 7336 \u0441\u0442\u0440\u043e\u043a (Rows Removed by Filter: 7336), \u044d\u0442\u043e \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 (5). \u0410 \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 194 \u0442\u044b\u0441\u044f\u0447\u0438 \u0441\u0442\u0440\u043e\u043a, \u0442\u043e \u043f\u043e\u0438\u0441\u043a \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0430 194 \u0442\u044b\u0441\u044f\u0447\u0438 \u0440\u0430\u0437 (6), \u0442.\u043a. \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 2\u0445 \u044d\u0442\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 Nested Loop (\u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0446\u0438\u043a\u043b\u044b) (7). \u0421\u0443\u043c\u043c\u0430\u0440\u043d\u043e \u0432 \u0443\u0437\u043b\u0435 index Scan \u0447\u0435\u0440\u0435\u0437 Filter \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u0442\u043e\u0440\u0430 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u0430 \u0441\u0442\u0440\u043e\u043a (8), \u0447\u0442\u043e \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u043f\u043b\u0430\u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 &#8212; 3 433 \u0441\u0435\u043a\u0443\u043d\u0434\u044b (9).<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 2 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0437 194 \u0442\u044b\u0441\u044f\u0447 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e 5520 \u0441\u0442\u0440\u043e\u043a (10), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438\u0442\u043e\u0433\u043e\u0432 (11).<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438\u0442\u043e\u0433\u043e\u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 2\u0445 \u044d\u0442\u0430\u043f\u043e\u0432:\u00a0<\/p>\n<ol>\n<li>\n<p>\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 (INSERT) \u043f\u043e \u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0438\u043e\u0434\u0443, \u0441\u0447\u0435\u0442\u0443, \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0431\u044b\u043b\u043e \u0435\u0449\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u0442\u043e\u0433\u043e\u0432 &#8212; \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0432\u044b\u0448\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 (UPDATE) \u043f\u043e \u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0438\u043e\u0434\u0443, \u0441\u0447\u0435\u0442\u0443, \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u0442\u043e\u0433\u043e\u0432 &#8212; \u0432\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u043e\u0433\u043e\u00a0<a href=\"https:\/\/explain.tensor.ru\/archive\/explain\/660ddd2a8914128a6d9e73a99e8c4365:0:2026-04-17\">\u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/a>. \u041f\u0440\u0438\u0447\u0438\u043d\u044b \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0443\u0442 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u043a\u0430\u043a \u0438 \u0432\u044b\u0448\u0435 &#8212; \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043f\u0440\u0438 Index Scan \u0432 \u0446\u0438\u043a\u043b\u0435.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e \u043f\u043b\u0430\u043d\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b: \u043f\u043e \u043a\u0430\u043a\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c\u044b\u0445 \u0441\u0442\u0440\u043e\u043a? \u0411\u044b\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445? \u0410 \u043c\u043e\u0436\u0435\u0442 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043e\u0448\u0438\u0431\u0441\u044f, \u0438 \u0432\u044b\u0431\u0440\u0430\u043b \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441?<\/p>\n<p>\u041d\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0435 \u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441 \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0442\u043e\u0433\u043e\u0432.<\/p>\n<p>\u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u044f \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b \u0442\u0438\u043f\u043e\u0432\u0443\u044e \u0434\u0435\u043c\u043e-\u0431\u0430\u0437\u0443 ERP 2.5.8. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 &#171;\u0425\u043e\u0437\u0440\u0430\u0441\u0447\u0435\u0442\u043d\u044b\u0439&#187; \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/d8\/be\/0c\/d8be0c9ee33be78d807a525bf12ca726.png\" width=\"548\" height=\"556\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/d8\/be\/0c\/d8be0c9ee33be78d807a525bf12ca726.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/d8\/be\/0c\/d8be0c9ee33be78d807a525bf12ca726.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0437\u043d\u0430\u043a <code>\u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0439=\u043d\u0435\u0442<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u043e\u0434\u043a\u0438 \u0432 \u0434\u0435\u0431\u0435\u0442\u0435 \u0438 \u043a\u0440\u0435\u0434\u0438\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 (\u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430, \u0442.\u043a. \u0443 \u043d\u0435\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a <code>\u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0439=\u0434\u0430<\/code>).<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0442\u043e\u0433\u043e\u0432 \u043f\u043e \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e \u0438 \u0438\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/d4\/de\/0c\/d4de0ca651886340efeccea94484c040.png\" width=\"1270\" height=\"759\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/d4\/de\/0c\/d4de0ca651886340efeccea94484c040.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/d4\/de\/0c\/d4de0ca651886340efeccea94484c040.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438 \u0441\u043e\u0441\u0442\u0430\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439, \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0442\u043e\u0433\u043e\u0432 \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0447\u0435\u0442\u0430\u043c \u0438 \u0418\u0442\u043e\u0433\u0438\u041c\u0435\u0436\u0434\u0443\u0421\u0447\u0435\u0442\u0430\u043c\u0438 \u043c\u044b \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c, \u0442.\u043a. \u0432 \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u043d\u0438 \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/16\/6e\/31\/166e312278c242f9f625ae58550572cd.png\" width=\"1269\" height=\"674\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/16\/6e\/31\/166e312278c242f9f625ae58550572cd.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/16\/6e\/31\/166e312278c242f9f625ae58550572cd.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0418\u043d\u0434\u0435\u043a\u0441\u044b, \u043a\u0430\u043a \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e, \u043d\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u043c\u0435\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f:<br \/>\u0418\u043d\u0434\u0435\u043a\u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0447\u0435\u0442\u0430\u043c\u0421\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e1 \u0438\u043c\u0435\u0435\u0442 \u0432 \u0441\u0432\u043e\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u043d\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0412\u0430\u043b\u044e\u0442\u0430 \u0438 \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0438\u043d\u0434\u0435\u043a\u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0447\u0435\u0442\u0430\u043c\u0421\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e2 \u0442\u043e\u043b\u044c\u043a\u043e \u0412\u0430\u043b\u044e\u0442\u0443, \u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0447\u0435\u0442\u0430\u043c\u0421\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e3 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0442 \u043d\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439. \u0410 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u0414\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0442 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445!\u00a0<\/p>\n<blockquote>\n<p><strong>\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c<\/strong><\/p>\n<p>\u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0442\u043e\u0433\u043e\u0432 \u043f\u043e \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e \u0435\u0441\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u201c\u043d\u0430\u043f\u0430\u0440\u043d\u0438\u043a\u201d. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0447\u0435\u0442\u0430\u043c\u0421\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e1 \u043f\u043e\u043c\u0438\u043c\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 AccRgAT1817851 \u0435\u0441\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 AccRgAT1817851ong. \u0421\u043e\u0441\u0442\u0430\u0432 \u043f\u043e\u043b\u0435\u0439 \u0443 \u044d\u0442\u0438\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432. \u041e\u0442\u043b\u0438\u0447\u0438\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e \u043f\u043e\u043b\u044f\u043c, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 NULL, \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f COALESCE.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 <em>AccRgAT181785<\/em>1 \u043f\u043e\u043b\u0435 \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043a \u043f\u043e\u043b\u0435 <em>Fld81745RRef, \u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u00a0<\/em>AccRgAT181785_1ong \u043e\u043d\u043e \u0437\u0430\u0434\u0430\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 COALESCE(_Fld81745RRef, &#8216;\\xff&#8217;::bytea).<\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u043e\u0433 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 IsNull() \u0432 MS SQL Server, \u0442\u043e \u0435\u0441\u0442\u044c \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0435\u0440\u0432\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0432\u043d\u043e Null, \u0442\u043e \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430.<\/p>\n<\/blockquote>\n<p>\u0418 \u0437\u0434\u0435\u0441\u044c \u043c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430: \u0442.\u043a. \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0442\u043e\u0433\u043e\u0432 \u043f\u043e \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e 2 \u0438 3 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432\u0441\u0435\u0445 \u043d\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439, \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043d\u0438 \u043a\u0430\u043a \u0440\u0430\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u044e\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u044d\u0442\u0438\u043c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c. \u0422.\u0435. \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u0442\u043e\u0433\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/a6\/e0\/68\/a6e068fe93d4fd610581bab0d68c5b9b.png\" width=\"1272\" height=\"315\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/a6\/e0\/68\/a6e068fe93d4fd610581bab0d68c5b9b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/a6\/e0\/68\/a6e068fe93d4fd610581bab0d68c5b9b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041c\u044b \u0432\u0438\u0434\u0438\u043c 5 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0441\u0435 \u043f\u043e\u043b\u044f, \u043a\u0440\u043e\u043c\u0435 \u043f\u043e\u043b\u044f \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0418 \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0442\u043e\u0433\u0438 \u043f\u043e \u044d\u0442\u0438\u043c \u0432\u0441\u0435\u043c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c \u0438 \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044e &#171;\u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u04351&#187;, \u0442\u043e \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u044d\u0442\u0438 5 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0438 \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 Filter \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c 4 \u0438\u0437 \u043d\u0438\u0445, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 &lt;&gt; \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u04351:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/81\/b9\/41\/81b941ed5c6ef62ff947fa1f06076d51.png\" width=\"1116\" height=\"797\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/81\/b9\/41\/81b941ed5c6ef62ff947fa1f06076d51.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/81\/b9\/41\/81b941ed5c6ef62ff947fa1f06076d51.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0422\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0441\u0442\u0435\u043d\u0434\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0432\u043e\u0434\u043e\u0432.<\/p>\n<h2>\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/h2>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c 3 \u0442\u044b\u0441\u044f\u0447\u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0432 \u0434\u0435\u043c\u043e-\u0431\u0430\u0437\u0435 ERP \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435\u043c &#171;\u0422\u0435\u0441\u0442N&#187;:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/90\/2d\/d6\/902dd6a65c3bfd5fc473c2a890fa35df.png\" width=\"900\" height=\"367\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/90\/2d\/d6\/902dd6a65c3bfd5fc473c2a890fa35df.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/90\/2d\/d6\/902dd6a65c3bfd5fc473c2a890fa35df.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u0442\u043e\u0433\u043e\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u0440\u043e\u043c\u0435 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043c &#171;\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f (\u0440\u0435\u0433\u043b\u0430\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0443\u0447\u0435\u0442)&#187;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u043a\u0438. \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0432 \u043d\u0435\u043c 3 \u0442\u044b\u0441\u044f\u0447\u0438 \u0441\u0442\u0440\u043e\u043a \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043a\u043e\u0434\u0430 \u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/c6\/2a\/b2\/c62ab2ce475b82ae9a098290505d03de.png\" width=\"1538\" height=\"661\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/c6\/2a\/b2\/c62ab2ce475b82ae9a098290505d03de.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/c6\/2a\/b2\/c62ab2ce475b82ae9a098290505d03de.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0435\u0433\u043e \u0438 \u0438\u0449\u0435\u043c \u0432 \u043b\u043e\u0433\u0435 \u0421\u0423\u0411\u0414 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0442\u043e\u0433\u043e\u0432 \u043f\u043e \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e.\u00a0<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043b\u0430\u0441\u044c \u0438 \u0443 \u043d\u0430\u0441 \u0442\u0430\u043a\u0436\u0435 \u0438\u0434\u0435\u0442 \u0434\u043e\u043b\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0442\u043e\u0433\u043e\u0432 \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435 <a href=\"https:\/\/explain.tensor.ru\/archive\/explain\/37368e2293db62e18eae56af4850c07a:0:2026-05-15#explain\">\u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e3<\/a>:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/6f\/8b\/fc\/6f8bfc90a17b2a2a7de1e7579b44a531.png\" width=\"1669\" height=\"512\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/6f\/8b\/fc\/6f8bfc90a17b2a2a7de1e7579b44a531.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/6f\/8b\/fc\/6f8bfc90a17b2a2a7de1e7579b44a531.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0427\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432 \u043f\u043b\u0430\u043d\u0435:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0442\u043e\u0433\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043d 3002 \u0440\u0430\u0437\u0430, \u0442.\u043a. \u0443 \u043d\u0430\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0446\u0438\u043a\u043b\u044b<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442\u0441\u044f 3050 \u0437\u0430\u043f\u0438\u0441\u0435\u0439<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0443\u0437\u0435\u043b \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 3,5 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 &#8212; \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u0414\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043f\u043e\u043f\u0430\u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0442\u043e\u0440\u0435, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0441\u043c\u043e\u0442\u0440\u044e \u0441\u043e\u0441\u0442\u0430\u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0438 \u0432\u0438\u0436\u0443, \u0447\u0442\u043e \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e2, \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e3 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0430\u0441\u044c &#8212; \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u043b\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0411\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438.\u0425\u043e\u0437\u0440\u0430\u0441\u0447\u0435\u0442\u043d\u044b\u0439.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u044f \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c Nested Loop (enable_nestloop = off) \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0447\u0435\u0440\u0435\u0437 Hash Join. \u0417\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u0437\u0430 0,1 \u0441\u0435\u043a\u0443\u043d\u0434\u044b (<a href=\"https:\/\/explain.tensor.ru\/archive\/explain\/2965c682ee560b635ff008b0c4626c06:0:2026-05-15\">\u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/a>) &#8212; \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041e\u0442\u0441\u044e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e Hash Join \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0442\u043e\u0433\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0442\u0430\u0431\u043b\u0438\u0446. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442.<\/p>\n<h2>\u041f\u043e\u0447\u0435\u043c\u0443 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 Hash Join<\/h2>\n<p>\u041c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0431\u043e\u0440 Hash Join \u0432\u043c\u0435\u0441\u0442\u043e Nested Loop. \u041a\u0430\u043a \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u0437 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f Nested Loop?<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u043b\u0430\u043d\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 EXPLAIN, \u0431\u0435\u0437 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 ANALYZE, \u0442.\u043a. \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043e\u0446\u0435\u043d\u043a\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 &#8212; \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b.<\/p>\n<p>\u041f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441 Nested Loop:<\/p>\n<pre><code>Update on _accrgat381787  (cost=0.16..1330.05 rows=0 width=0)\"\"  -&gt;  Nested Loop  (cost=0.16..1330.05 rows=1 width=652)\"\"        -&gt;  Seq Scan on tt19 t2  (cost=0.00..144.02 rows=3002 width=333)\"\"              Filter: ((_fld2830 = '0'::numeric) AND (_edcount = '3'::numeric))\"\"        -&gt;  Index Scan using _accrgat381787_1 on _accrgat381787  (cost=0.16..0.39 rows=1 width=324)\"\"              Index Cond: ((_fld2830 = '0'::numeric) AND (_accountrref = t2._accountrref) AND (_period = t2._period) AND (_fld81743rref = t2._fld81743rref) AND (_value1_type = t2._value1_type) AND (_value1_rtref = t2._value1_rtref) AND (_value1_rrref = t2._value1_rrref) AND (_value2_type = t2._value2_type) AND (_value2_rtref = t2._value2_rtref) AND (_value2_rrref = t2._value2_rrref) AND (_value3_type = t2._value3_type) AND (_value3_rtref = t2._value3_rtref) AND (_value3_rrref = t2._value3_rrref) AND (_splitter = '0'::numeric))\"\"              Filter: ((COALESCE(t2._fld81744rref, '\\\\xff'::bytea) = COALESCE(_fld81744rref, '\\\\xff'::bytea)) AND (COALESCE(t2._fld81745rref, '\\\\xff'::bytea) = COALESCE(_fld81745rref, '\\\\xff'::bytea)) AND (COALESCE(t2._fld81746rref, '\\\\xff'::bytea) = COALESCE(_fld81746rref, '\\\\xff'::bytea)))\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper\"><\/span><\/a><\/div><\/pre>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c Nested Loop = 1330.05.<\/p>\n<p>\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 &#171;SET enable_nestloop=off;&#187; \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0435\u0449\u0435 \u0440\u0430\u0437, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043b\u0430\u043d \u0441 Hash Join:<\/p>\n<pre><code>Update on _accrgat381787  (cost=219.07..21766.70 rows=0 width=0)\"\"  -&gt;  Hash Join  (cost=219.07..21766.70 rows=1 width=652)\"\"        Hash Cond: ((_accrgat381787._period = t2._period) AND (_accrgat381787._accountrref = t2._accountrref) AND (_accrgat381787._fld81743rref = t2._fld81743rref) AND (COALESCE(_accrgat381787._fld81744rref, '\\\\xff'::bytea) = COALESCE(t2._fld81744rref, '\\\\xff'::bytea)) AND (COALESCE(_accrgat381787._fld81745rref, '\\\\xff'::bytea) = COALESCE(t2._fld81745rref, '\\\\xff'::bytea)) AND (COALESCE(_accrgat381787._fld81746rref, '\\\\xff'::bytea) = COALESCE(t2._fld81746rref, '\\\\xff'::bytea)) AND (_accrgat381787._value1_type = t2._value1_type) AND (_accrgat381787._value1_rtref = t2._value1_rtref) AND (_accrgat381787._value1_rrref = t2._value1_rrref) AND (_accrgat381787._value2_type = t2._value2_type) AND (_accrgat381787._value2_rtref = t2._value2_rtref) AND (_accrgat381787._value2_rrref = t2._value2_rrref) AND (_accrgat381787._value3_type = t2._value3_type) AND (_accrgat381787._value3_rtref = t2._value3_rtref) AND (_accrgat381787._value3_rrref = t2._value3_rrref))\"\"        -&gt;  Seq Scan on _accrgat381787  (cost=0.00..348.58 rows=5215 width=324)\"\"              Filter: ((_fld2830 = '0'::numeric) AND (_splitter = '0'::numeric))\"\"        -&gt;  Hash  (cost=144.02..144.02 rows=3002 width=333)\"\"              -&gt;  Seq Scan on tt19 t2  (cost=0.00..144.02 rows=3002 width=333)\"\"                    Filter: ((_fld2830 = '0'::numeric) AND (_edcount = '3'::numeric))\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c Hash Join = 21766.70, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 Nested Loop \u0432 16 \u0440\u0430\u0437.<\/p>\n<p>\u041c\u043e\u0436\u0435\u0442 \u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 COALESCE \u0442\u0430\u043a \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Hash Join? \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u044d\u0442\u043e, \u043f\u043e\u043c\u0435\u043d\u044f\u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u043f\u043e \u043f\u043e\u043b\u044e \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u00a0<\/p>\n<pre><code>AND (COALESCE(T2._Fld81745RRef,'\\377'::bytea) = COALESCE(_AccRgAT381787._Fld81745RRef,'\\377'::bytea))<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u043d\u0430<\/p>\n<pre><code>AND T2._Fld81745RRef = _AccRgAT381787._Fld81745RRef<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c &#171;SET enable_nestloop=on;&#187; \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code>\"Update on _accrgat381787  (cost=219.07..765.90 rows=0 width=0)\"\"  -&gt;  Hash Join  (cost=219.07..765.90 rows=1 width=652)\"\"        Hash Cond: ((_accrgat381787._period = t2._period) AND (_accrgat381787._accountrref = t2._accountrref) AND (_accrgat381787._fld81743rref = t2._fld81743rref) AND (COALESCE(_accrgat381787._fld81744rref, '\\\\xff'::bytea) = COALESCE(t2._fld81744rref, '\\\\xff'::bytea)) AND (_accrgat381787._fld81745rref = t2._fld81745rref) AND (COALESCE(_accrgat381787._fld81746rref, '\\\\xff'::bytea) = COALESCE(t2._fld81746rref, '\\\\xff'::bytea)) AND (_accrgat381787._value1_type = t2._value1_type) AND (_accrgat381787._value1_rtref = t2._value1_rtref) AND (_accrgat381787._value1_rrref = t2._value1_rrref) AND (_accrgat381787._value2_type = t2._value2_type) AND (_accrgat381787._value2_rtref = t2._value2_rtref) AND (_accrgat381787._value2_rrref = t2._value2_rrref) AND (_accrgat381787._value3_type = t2._value3_type) AND (_accrgat381787._value3_rtref = t2._value3_rtref) AND (_accrgat381787._value3_rrref = t2._value3_rrref))\"\"        -&gt;  Seq Scan on _accrgat381787  (cost=0.00..348.58 rows=5215 width=324)\"\"              Filter: ((_fld2830 = '0'::numeric) AND (_splitter = '0'::numeric))\"\"        -&gt;  Hash  (cost=144.02..144.02 rows=3002 width=333)\"\"              -&gt;  Seq Scan on tt19 t2  (cost=0.00..144.02 rows=3002 width=333)\"\"                    Filter: ((_fld2830 = '0'::numeric) AND (_edcount = '3'::numeric))\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0432\u044b\u0431\u0440\u0430\u043b Hash Join \u0438 \u0435\u0433\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u0430\u0441\u044c \u0441 21766.70 \u0434\u043e 765.90 &#8212; \u043e\u043d \u0441\u0442\u0430\u043b \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 Nested Loop.<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 COALESCE \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u044b\u0448\u0430\u0435\u0442 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c Hash Join. \u041d\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u0432 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445, \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 pg_proc. \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0435\u0451 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c:<\/p>\n<pre><code>SELECT    p.proname          AS function_name,    p.procost          AS cost,    p.prorows          AS estimated_rows,    p.proisstrict      AS is_strict,    p.prorettype::regtype AS return_typeFROM pg_proc pWHERE p.proname = 'coalesce';<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u041d\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u0435\u0440\u043d\u0443\u043b \u043f\u0443\u0441\u0442\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u0434\u0435-\u0442\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435. \u042f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043b, \u0447\u0442\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Hash Join \u0435\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0440\u0430\u0441\u0447\u0435\u0442\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 COALESCE, \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0437\u0430\u0434\u0430\u0447\u0443 \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0421\u0423\u0411\u0414, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 COALESCE<\/h2>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0421\u0423\u0411\u0414 \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f COALESCE, \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043d\u0435 \u043c\u043e\u0433 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u0442\u0430\u043a\u043e\u043c\u0443 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044e \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b \u0436\u0451\u0441\u0442\u043a\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u0443\u044e \u0432 \u043a\u043e\u0434\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443: \u0441\u0447\u0438\u0442\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e 10% \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u043e\u043a \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u043e\u0434\u0438\u043d bucket \u0445\u044d\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0437\u0430\u0432\u044b\u0448\u0430\u043b\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c Hash Join. \u041c\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u044d\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435: \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c, \u0430 \u043d\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 enable_coalesce_estimation, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 &#171;<a href=\"https:\/\/habr.com\/ru\/companies\/tantor\/articles\/1090882\">\u041f\u043e\u0447\u0435\u043c\u0443 COALESCE \u043b\u043e\u043c\u0430\u0435\u0442 \u043f\u043b\u0430\u043d PostgreSQL \u0438 \u043a\u0430\u043a \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c?<\/a>&#171;.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430\u0448\u0435\u0439 \u0421\u0423\u0411\u0414 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e \u043e\u043f\u044f\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 ERP \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u043b\u0430\u043d:<\/p>\n<pre><code>\"Update on _accrgat381787  (cost=219.07..786.76 rows=0 width=0)\"\"  -&gt;  Hash Join  (cost=219.07..786.76 rows=1 width=652)\"\"        Hash Cond: ((_accrgat381787._period = t2._period) AND (_accrgat381787._accountrref = t2._accountrref) AND (_accrgat381787._fld81743rref = t2._fld81743rref) AND (COALESCE(_accrgat381787._fld81744rref, '\\\\xff'::bytea) = COALESCE(t2._fld81744rref, '\\\\xff'::bytea)) AND (COALESCE(_accrgat381787._fld81745rref, '\\\\xff'::bytea) = COALESCE(t2._fld81745rref, '\\\\xff'::bytea)) AND (COALESCE(_accrgat381787._fld81746rref, '\\\\xff'::bytea) = COALESCE(t2._fld81746rref, '\\\\xff'::bytea)) AND (_accrgat381787._value1_type = t2._value1_type) AND (_accrgat381787._value1_rtref = t2._value1_rtref) AND (_accrgat381787._value1_rrref = t2._value1_rrref) AND (_accrgat381787._value2_type = t2._value2_type) AND (_accrgat381787._value2_rtref = t2._value2_rtref) AND (_accrgat381787._value2_rrref = t2._value2_rrref) AND (_accrgat381787._value3_type = t2._value3_type) AND (_accrgat381787._value3_rtref = t2._value3_rtref) AND (_accrgat381787._value3_rrref = t2._value3_rrref))\"\"        -&gt;  Seq Scan on _accrgat381787  (cost=0.00..348.58 rows=5215 width=324)\"\"              Filter: ((_fld2830 = '0'::numeric) AND (_splitter = '0'::numeric))\"\"        -&gt;  Hash  (cost=144.02..144.02 rows=3002 width=333)\"\"              -&gt;  Seq Scan on tt19 t2  (cost=0.00..144.02 rows=3002 width=333)\"\"                    Filter: ((_fld2830 = '0'::numeric) AND (_edcount = '3'::numeric))\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c Hash Join \u0443\u043f\u0430\u043b\u0430 \u0441 21766.70 \u0434\u043e 786.76 \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0435\u0433\u043e \u0432\u043c\u0435\u0441\u0442\u043e Nested Loop.\u00a0<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0438 \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u044d\u0442\u043e \u0440\u0435\u0448\u0438\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 &#8212; \u043e\u0442\u0434\u0430\u043b\u0438 \u0435\u043c\u0443 \u0441\u0431\u043e\u0440\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u041d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u0441 \u0443\u0434\u0438\u0432\u0438\u043b: \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043c\u0435\u0441\u044f\u0446\u0430 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u043e\u0441\u044c 8 \u0447\u0430\u0441\u043e\u0432. \u0410\u043d\u0430\u043b\u0438\u0437 \u043b\u043e\u0433\u043e\u0432 \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0432\u0441\u044e \u0442\u0443 \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u0447\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f Nested Loop, \u0430 \u043d\u0435 Hash Join<\/p>\n<p>\u041d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0441\u0442\u0435\u043d\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u0442\u043e\u0433\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0430 \u043e\u043a\u043e\u043b\u043e 5 \u0442\u044b\u0441\u044f\u0447 \u0441\u0442\u0440\u043e\u043a &#8212; \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f <code>enable_coalesce_estimation<\/code> \u0441\u043d\u0438\u0436\u0430\u043b\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c Hash Join \u0434\u043e \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f. \u0423 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0442\u0430 \u0436\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u0441\u0442\u0440\u043e\u043a. \u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043e\u0431\u044a\u0451\u043c\u0435 \u0434\u0430\u0436\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 COALESCE \u0434\u0430\u0432\u0430\u043b\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c Hash Join \u0432 \u0440\u0430\u0437\u044b \u0432\u044b\u0448\u0435 Nested Loop &#8212; \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u043b \u043d\u0435\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043b\u0430\u043d.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u041c\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043b\u0438 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043d\u0430\u043c 2\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0442\u043e\u0433\u043e\u0432: \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b\u00a0\u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0447\u0435\u0442\u0430\u043c\u0421\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e2. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 <a href=\"https:\/\/docs.tantorlabs.ru\/tdb\/ru\/17_9\/se1c\/auto_dump.html\">auto_dump<\/a> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438:<\/p>\n<pre><code>shared_preload_libraries = 'auto_dump'auto_dump.enable = 'on'auto_dump.dump_persistent_tables = 'on'auto_dump.output_directory = '\/var\/lib\/postgresql\/auto_dump_files\/'auto_dump.dump_on_query_string = 'UPDATE _AccRgAT251202'<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c SQL-\u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0438 \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0442\u0430\u0431\u043b\u0438\u0446, \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u0438\u0441\u043a\u043e\u043c\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 dump_on_query_string). \u0414\u0430\u043c\u043f\u044f\u0442\u0441\u044f \u043a\u0430\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0442\u0430\u043a \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u00a0dump_persistent_tables).<\/p>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0435\u0449\u0435 \u0440\u0430\u0437 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043c\u0435\u0441\u044f\u0446\u0430, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0431\u044b\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e &#171;\u0441\u0434\u0430\u043c\u043f\u043b\u0435\u043d&#187; \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u043d\u0430\u043c. \u0414\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u043f\u0440\u0438\u0447\u0438\u043d. \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c.<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u043b\u0430\u043d:<\/p>\n<pre><code>\"Update on _accrgat251202  (cost=0.22..416403.07 rows=0 width=0)\"\"  -&gt;  Nested Loop  (cost=0.22..416403.07 rows=187541 width=492)\"\"        -&gt;  Seq Scan on tt11 t2  (cost=0.00..51105.79 rows=590432 width=240)\"\"              Filter: ((_edcount = '2'::numeric) AND (_fld3181 = '0'::numeric))\"\"        -&gt;  Index Scan using _accrgat251202_1o on _accrgat251202  (cost=0.22..0.59 rows=1 width=225)\"\"              Index Cond: ((_fld3181 = '0'::numeric) AND (_accountrref = t2._accountrref) AND (_period = t2._period) AND (_fld51168rref = t2._fld51168rref) AND (COALESCE(_value1_type, '\\xff'::bytea) = COALESCE(t2._value1_type, '\\xff'::bytea)) AND (COALESCE(_value1_rtref, '\\xff'::bytea) = COALESCE(t2._value1_rtref, '\\xff'::bytea)) AND (COALESCE(_value1_rrref, '\\xff'::bytea) = COALESCE(t2._value1_rrref, '\\xff'::bytea)) AND (COALESCE(_value2_type, '\\xff'::bytea) = COALESCE(t2._value2_type, '\\xff'::bytea)) AND (COALESCE(_value2_rtref, '\\xff'::bytea) = COALESCE(t2._value2_rtref, '\\xff'::bytea)) AND (COALESCE(_value2_rrref, '\\xff'::bytea) = COALESCE(t2._value2_rrref, '\\xff'::bytea)) AND (_splitter = '0'::numeric))\"\"              Filter: ((COALESCE(t2._fld51171rref, '\\xff'::bytea) = COALESCE(_fld51171rref, '\\xff'::bytea)) AND (COALESCE(t2._fld51170rref, '\\xff'::bytea) = COALESCE(_fld51170rref, '\\xff'::bytea)) AND (COALESCE(t2._fld51169rref, '\\xff'::bytea) = COALESCE(_fld51169rref, '\\xff'::bytea)))\"\"              Estimated Fetched Rows: 1\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0412\u0438\u0434\u0438\u043c \u0438\u0437 \u043f\u043b\u0430\u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0447\u0442\u043e \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0443\u0437\u043b\u0430 Nested Loop \u0440\u0430\u0432\u043d\u0430 416 \u0442\u044b\u0441\u044f\u0447. \u0412\u044b\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e enable_nestloop=off \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c Hash Join:<\/p>\n<pre><code>\"Update on _accrgat251202  (cost=234462.77..3433670334.57 rows=0 width=0)\"\"  -&gt;  Hash Join  (cost=234462.77..3433670334.57 rows=187541 width=492)\"\"        Hash Cond: ((t2._period = _accrgat251202._period) AND (t2._accountrref = _accrgat251202._accountrref) AND (t2._fld51168rref = _accrgat251202._fld51168rref) AND (COALESCE(t2._fld51169rref, '\\xff'::bytea) = COALESCE(_accrgat251202._fld51169rref, '\\xff'::bytea)) AND (COALESCE(t2._fld51170rref, '\\xff'::bytea) = COALESCE(_accrgat251202._fld51170rref, '\\xff'::bytea)) AND (COALESCE(t2._fld51171rref, '\\xff'::bytea) = COALESCE(_accrgat251202._fld51171rref, '\\xff'::bytea)) AND (COALESCE(t2._value1_type, '\\xff'::bytea) = COALESCE(_accrgat251202._value1_type, '\\xff'::bytea)) AND (COALESCE(t2._value1_rtref, '\\xff'::bytea) = COALESCE(_accrgat251202._value1_rtref, '\\xff'::bytea)) AND (COALESCE(t2._value1_rrref, '\\xff'::bytea) = COALESCE(_accrgat251202._value1_rrref, '\\xff'::bytea)) AND (COALESCE(t2._value2_type, '\\xff'::bytea) = COALESCE(_accrgat251202._value2_type, '\\xff'::bytea)) AND (COALESCE(t2._value2_rtref, '\\xff'::bytea) = COALESCE(_accrgat251202._value2_rtref, '\\xff'::bytea)) AND (COALESCE(t2._value2_rrref, '\\xff'::bytea) = COALESCE(_accrgat251202._value2_rrref, '\\xff'::bytea)))\"\"        -&gt;  Seq Scan on tt11 t2  (cost=0.00..51105.79 rows=590432 width=240)\"\"              Filter: ((_edcount = '2'::numeric) AND (_fld3181 = '0'::numeric))\"\"        -&gt;  Hash  (cost=155581.04..155581.04 rows=3585533 width=225)\"\"              -&gt;  Seq Scan on _accrgat251202  (cost=0.00..155581.04 rows=3585533 width=225)\"\"                    Filter: ((_splitter = '0'::numeric) AND (_fld3181 = '0'::numeric))\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u0436 3.4 \u043c\u043b\u0440\u0434, \u0442.\u0435. \u043f\u043e\u0447\u0442\u0438 \u0432 100 \u0442\u044b\u0441\u044f\u0447 \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435! \u0412\u043a\u043b\u044e\u0447\u0438\u043c \u043d\u0430\u0448\u0443 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 COALESCE &#8212; enable_coalesce_estimation = on:<\/p>\n<pre><code>\"Update on _accrgat251202  (cost=64095.29..1756525012.03 rows=0 width=0)\"\"  -&gt;  Hash Join  (cost=64095.29..1756525012.03 rows=187541 width=492)\"\"        Hash Cond: ((_accrgat251202._period = t2._period) AND (_accrgat251202._accountrref = t2._accountrref) AND (_accrgat251202._fld51168rref = t2._fld51168rref) AND (COALESCE(_accrgat251202._fld51169rref, '\\xff'::bytea) = COALESCE(t2._fld51169rref, '\\xff'::bytea)) AND (COALESCE(_accrgat251202._fld51170rref, '\\xff'::bytea) = COALESCE(t2._fld51170rref, '\\xff'::bytea)) AND (COALESCE(_accrgat251202._fld51171rref, '\\xff'::bytea) = COALESCE(t2._fld51171rref, '\\xff'::bytea)) AND (COALESCE(_accrgat251202._value1_type, '\\xff'::bytea) = COALESCE(t2._value1_type, '\\xff'::bytea)) AND (COALESCE(_accrgat251202._value1_rtref, '\\xff'::bytea) = COALESCE(t2._value1_rtref, '\\xff'::bytea)) AND (COALESCE(_accrgat251202._value1_rrref, '\\xff'::bytea) = COALESCE(t2._value1_rrref, '\\xff'::bytea)) AND (COALESCE(_accrgat251202._value2_type, '\\xff'::bytea) = COALESCE(t2._value2_type, '\\xff'::bytea)) AND (COALESCE(_accrgat251202._value2_rtref, '\\xff'::bytea) = COALESCE(t2._value2_rtref, '\\xff'::bytea)) AND (COALESCE(_accrgat251202._value2_rrref, '\\xff'::bytea) = COALESCE(t2._value2_rrref, '\\xff'::bytea)))\"\"        -&gt;  Seq Scan on _accrgat251202  (cost=0.00..155581.04 rows=3585533 width=225)\"\"              Filter: ((_splitter = '0'::numeric) AND (_fld3181 = '0'::numeric))\"\"        -&gt;  Hash  (cost=51105.79..51105.79 rows=590432 width=240)\"\"              -&gt;  Seq Scan on tt11 t2  (cost=0.00..51105.79 rows=590432 width=240)\"\"                    Filter: ((_edcount = '2'::numeric) AND (_fld3181 = '0'::numeric))\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0443\u043f\u0430\u043b\u0430 \u0432 2 \u0440\u0430\u0437\u0430 \u0441 3.4 \u0434\u043e 1.7 \u043c\u043b\u0440\u0434, \u043d\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0442.\u043a.\u00a0Hash Join \u0432\u0441\u0435 \u0435\u0449\u0435 \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u0440\u043e\u0433 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 Nested Loop. \u0418\u043b\u0438 \u043c\u043e\u0436\u0435\u0442 Nested Loop \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u0435\u0448\u0435\u0432? \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432\u0435\u0434\u044c \u043f\u0440\u0438 \u043e\u0446\u0435\u043d\u043a\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u043d \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0447\u0435\u0440\u0435\u0437 Filter, \u0447\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412 \u043f\u043b\u0430\u043d\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441 Nested Loop \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443 <code>Estimated Fetched Rows<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043e \u0441 \u0434\u0438\u0441\u043a\u0430. \u041c\u044b \u0431\u044b \u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0448\u0442\u0440\u0430\u0444 \u0434\u043b\u044f Nested Loop \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u00a0<a href=\"https:\/\/infostart.ru\/1c\/articles\/2700235\/#%D0%98%D0%B7%D0%BC%D0%B5%D0%BD%D0%B5%D0%BD%D0%B8%D0%B5%20%D0%BB%D0%BE%D0%B3%D0%B8%D0%BA%D0%B8%20%D1%80%D0%B0%D1%81%D1%87%D0%B5%D1%82%D0%B0%20%D1%81%D1%82%D0%BE%D0%B8%D0%BC%D0%BE%D1%81%D1%82%D0%B8%20%D0%BE%D0%BF%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D0%B9%20Index\/Bitmap%20index%20scan\">cpu_filter_cost<\/a>, \u043d\u043e .\u0442.\u043a. \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u0435 \u0440\u0430\u0432\u043d\u043e 1, \u0442\u043e \u0448\u0442\u0440\u0430\u0444 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f &#8212; \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.\u00a0<\/p>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u0441 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c\u0438 \u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0438\u0434\u0435\u044f:<\/p>\n<p><em>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u0438\u0434 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043d\u0430 HashJoin, \u0435\u0441\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0430\u0443\u0437 (\u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0432 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446) \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u044f\u0442\u0438 &#8212; \u043e\u0446\u0435\u043d\u043a\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0441\u043c\u044b\u0441\u043b\u0430 \u043d\u0435 \u0438\u043c\u0435\u044e\u0442, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043b\u0430\u043d\u0430 \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 HashJoin &#8212; \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439, \u043a\u043e\u043d\u0441\u0435\u0440\u0432\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0437\u0430\u043f\u0430\u0441\u043d\u043e\u0439 \u043f\u043b\u0430\u043d.<\/em><\/p>\n<p>\u0410 \u0432 \u043f\u0430\u0442\u0447\u0435 PostgreSQL \u043e\u0442 \u0444\u0438\u0440\u043c\u044b 1\u0421 \u0432\u0435\u0440\u0441\u0438\u0438 18.4 \u0431\u044b\u043b\u0430 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438:<\/p>\n<p><em>\u0412\u0432\u0435\u0434\u0451\u043d \u0443\u0447\u0451\u0442 \u00ab\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0441\u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445\u00bb \u0443\u0441\u043b\u043e\u0432\u0438\u0439 (<\/em><code><em>CKLikelyCorrelated<\/em><\/code><em>), \u043f\u0440\u0438 5+ \u043a\u043b\u0430\u0443\u0437\u0430\u0445 \u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u043c\u043d\u043e\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 0.75 \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0430\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f.<\/em><\/p>\n<p>\u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043e\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u043d\u043e \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b\u0438 \u043d\u0430\u043c, \u0442.\u043a. \u043e\u043d\u0438 \u043d\u0435 \u0440\u0435\u0448\u0430\u043b\u0438 \u043f\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0437\u0430\u0432\u044b\u0448\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c\u044e Hash Join, \u0430 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0438 \u043b\u0438\u0448\u044c \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 (\u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0430), \u043a\u043e\u0433\u0434\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e Hash Join \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 Nested Loop. \u0418 \u0442\u043e, \u0434\u0430\u0436\u0435 \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0438\u0434\u0435\u044f \u0441 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0430 Hash Join \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0448\u0430\u043b\u0430 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u0443\u044e \u043d\u0430\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u0448\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0435\u043c..<\/p>\n<h2>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Hash Join \u0438 \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c<\/h2>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0440\u0430\u0431\u043e\u0442\u044b Hash Join \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u0415\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u0442\u043e\u0433\u043e\u0432 \u0438\u0437 6 \u0441\u0442\u0440\u043e\u043a \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0432 \u043d\u0435\u0451 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c. \u0421\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0438\u0445 \u0432\u0441\u0435\u0433\u043e \u043f\u043e \u0434\u0432\u0443\u043c \u043f\u043e\u043b\u044f\u043c: \u0421\u0447\u0451\u0442 \u0438 \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435. Hash Join \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430.<\/p>\n<p><strong>\u042d\u0442\u0430\u043f 1. \u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0445\u044d\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/strong> Hash Join \u0431\u0435\u0440\u0435\u0442 \u043e\u0434\u043d\u0443 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446, \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438\u0442\u043e\u0433\u043e\u0432, \u0438 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0435\u0451 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u043a\u043e\u0440\u0437\u0438\u043d\u0430\u043c &#8212; bucket&#8217;\u0430\u043c. \u041d\u043e\u043c\u0435\u0440 bucket&#8217;\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043f\u043e\u043b\u0435\u0439 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0440\u043e\u043a\u0430 \u00ab60, \u0421\u043a\u043b\u0430\u0434\u00bb \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0445\u044d\u0448 0 \u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 bucket 0, \u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u00ab62, \u041e\u0444\u0438\u0441\u00bb \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0445\u044d\u0448 1 \u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 bucket 1:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/f8\/45\/1a\/f8451ada014e8c22bf3e02207b53fb3b.png\" width=\"1100\" height=\"299\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/f8\/45\/1a\/f8451ada014e8c22bf3e02207b53fb3b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/f8\/45\/1a\/f8451ada014e8c22bf3e02207b53fb3b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u0430\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0445\u044d\u0448, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u043b\u0435\u0436\u0430\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c bucket&#8217;\u0435. \u041e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u043d\u0435\u0432\u0435\u0440\u043d\u043e: \u0432 \u043e\u0434\u0438\u043d bucket \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043a\u043b\u044e\u0447\u0430\u043c\u0438. \u041d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0432 bucket 1 \u043b\u0435\u0436\u0430\u0442 \u00ab62, \u041e\u0444\u0438\u0441\u00bb \u0438 \u00ab76, \u0421\u043a\u043b\u0430\u0434\u00bb. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0439\u0442\u0438 bucket \u0435\u0449\u0451 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e &#8212; \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p><strong>\u042d\u0442\u0430\u043f 2. \u041f\u043e\u0438\u0441\u043a.<\/strong> \u0422\u0435\u043f\u0435\u0440\u044c Hash Join \u0438\u0434\u0435\u0442 \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0414\u043b\u044f \u0441\u0442\u0440\u043e\u043a\u0438 \u00ab62, \u041e\u0444\u0438\u0441\u00bb \u043e\u043d \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0442\u043e\u0442 \u0436\u0435 \u0445\u044d\u0448, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 1 \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 bucket 1. \u0422\u0430\u043c \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438: \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u043e\u0432\u043f\u0430\u043b\u0430, \u0432\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u0431\u0440\u043e\u0448\u0435\u043d\u0430. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0434\u0432\u0430 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/aa\/50\/2d\/aa502d70aa4932493068fb946ca3a331.png\" width=\"1103\" height=\"169\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/aa\/50\/2d\/aa502d70aa4932493068fb946ca3a331.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/aa\/50\/2d\/aa502d70aa4932493068fb946ca3a331.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0432\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 Hash Join \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u043b\u0435\u0436\u0438\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c bucket&#8217;\u0435. \u0415\u0441\u043b\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0434\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0442\u044b\u0441\u044f\u0447\u0430, \u0442\u043e \u0442\u044b\u0441\u044f\u0447\u0430 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u0438 Hash Join \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0441\u0442\u0440\u043e\u043a \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0435\u0439.\u00a0<\/p>\n<p>\u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f bucket&#8217;\u043e\u0432 \u0435\u0449\u0435 \u043d\u0435\u0442, \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0443 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0443\u0433\u0430\u0434\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c bucket&#8217;\u0435. \u041e\u043d \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e \u043f\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435 \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044e 2 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 6 \u0441\u0442\u0440\u043e\u043a, \u0442\u043e \u0435\u0441\u0442\u044c 3 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 bucket&#8217;\u0435;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e \u0421\u0447\u0435\u0442\u0443 3 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0442\u043e \u0435\u0441\u0442\u044c 2 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 bucket&#8217;\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0438\u0437 \u044d\u0442\u0438\u0445 \u043e\u0446\u0435\u043d\u043e\u043a \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0430\u044f &#8212; 2 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0410 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u0441\u0435 6 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u00ab\u0421\u0447\u0435\u0442 + \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u00bb \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b, \u0438 \u0432 bucket&#8217;\u0435 \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0447\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u0431\u0435\u0437\u043e\u0431\u0438\u0434\u043d\u0430\u044f &#8212; 2 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u043c\u0435\u0441\u0442\u043e 1. \u041d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0438\u0434\u0435\u0442 \u043d\u0435 \u043f\u043e \u0434\u0432\u0443\u043c \u043f\u043e\u043b\u044f\u043c, \u0430 \u043f\u043e 12\u0442\u0438, \u0438 \u043d\u0435 \u043f\u043e 6 \u0441\u0442\u0440\u043e\u043a\u0430\u043c, \u0430 \u043f\u043e \u0441\u043e\u0442\u043d\u044f\u043c \u0442\u044b\u0441\u044f\u0447. \u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0434\u0443\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u043c bucket&#8217;\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0442\u044b\u0441\u044f\u0447 \u0441\u0442\u0440\u043e\u043a \u0438 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0432 \u0441\u0432\u043e\u0435\u0439 \u043e\u0446\u0435\u043d\u043a\u0435. \u041e\u0442\u0441\u044e\u0434\u0430 \u043c\u044b \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043e\u0446\u0435\u043d\u043a\u0443 Hash Join.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 2 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043e\u0446\u0435\u043d\u043a\u0443 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430:\u00a0<\/p>\n<ol>\n<li>\n<p>\u041d\u0430\u0443\u0447\u0438\u043b\u0438 \u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0434\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0439 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u0435<\/p>\n<\/li>\n<li>\n<p>\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043e\u0446\u0435\u043d\u043a\u0443 \u043f\u0440\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 Hash Join<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 2\u0445 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043d\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043e\u043d \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 Hash Join:<\/p>\n<pre><code>\"Update on _accrgat251202  (cost=234462.77..431064.43 rows=0 width=0)\"\"  -&gt;  Hash Join  (cost=234462.77..431064.43 rows=187541 width=492)\"\"        Hash Cond: ((t2._period = _accrgat251202._period) AND (t2._accountrref = _accrgat251202._accountrref) AND (t2._fld51168rref = _accrgat251202._fld51168rref) AND (COALESCE(t2._fld51169rref, '\\xff'::bytea) = COALESCE(_accrgat251202._fld51169rref, '\\xff'::bytea)) AND (COALESCE(t2._fld51170rref, '\\xff'::bytea) = COALESCE(_accrgat251202._fld51170rref, '\\xff'::bytea)) AND (COALESCE(t2._fld51171rref, '\\xff'::bytea) = COALESCE(_accrgat251202._fld51171rref, '\\xff'::bytea)) AND (COALESCE(t2._value1_type, '\\xff'::bytea) = COALESCE(_accrgat251202._value1_type, '\\xff'::bytea)) AND (COALESCE(t2._value1_rtref, '\\xff'::bytea) = COALESCE(_accrgat251202._value1_rtref, '\\xff'::bytea)) AND (COALESCE(t2._value1_rrref, '\\xff'::bytea) = COALESCE(_accrgat251202._value1_rrref, '\\xff'::bytea)) AND (COALESCE(t2._value2_type, '\\xff'::bytea) = COALESCE(_accrgat251202._value2_type, '\\xff'::bytea)) AND (COALESCE(t2._value2_rtref, '\\xff'::bytea) = COALESCE(_accrgat251202._value2_rtref, '\\xff'::bytea)) AND (COALESCE(t2._value2_rrref, '\\xff'::bytea) = COALESCE(_accrgat251202._value2_rrref, '\\xff'::bytea)))\"\"        -&gt;  Seq Scan on tt11 t2  (cost=0.00..51105.79 rows=590432 width=240)\"\"              Filter: ((_edcount = '2'::numeric) AND (_fld3181 = '0'::numeric))\"\"        -&gt;  Hash  (cost=155581.04..155581.04 rows=3585533 width=225)\"\"              -&gt;  Seq Scan on _accrgat251202  (cost=0.00..155581.04 rows=3585533 width=225)\"\"                    Filter: ((_splitter = '0'::numeric) AND (_fld3181 = '0'::numeric))\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0415\u0433\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u0430\u0441\u044c \u0441 1.7 \u043c\u043b\u0440\u0434 \u0434\u043e 431 \u0442\u044b\u0441\u044f\u0447\u0438.<\/p>\n<p>\u0410 Nested Loop \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0441\u0442\u0430\u043b \u0434\u043e\u0440\u043e\u0436\u0435 \u0438 \u0435\u0433\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u043e\u0437\u0440\u043e\u0441\u043b\u0430 \u0441 416 \u0442\u044b\u0441\u044f\u0447 \u0434\u043e 2\u0445 \u043c\u043b\u043d:<\/p>\n<pre><code>\"Update on _accrgat251202  (cost=0.22..2113304.64 rows=0 width=0)\"\"  -&gt;  Nested Loop  (cost=0.22..2113304.64 rows=187541 width=492)\"\"        -&gt;  Seq Scan on tt11 t2  (cost=0.00..51105.79 rows=590432 width=240)\"\"              Filter: ((_edcount = '2'::numeric) AND (_fld3181 = '0'::numeric))\"\"        -&gt;  Index Scan using _accrgat251202_1o on _accrgat251202  (cost=0.22..3.42 rows=6 width=225)\"\"              Index Cond: ((_fld3181 = '0'::numeric) AND (_accountrref = t2._accountrref) AND (_period = t2._period) AND (_fld51168rref = t2._fld51168rref) AND (COALESCE(_value1_type, '\\xff'::bytea) = COALESCE(t2._value1_type, '\\xff'::bytea)) AND (COALESCE(_value1_rtref, '\\xff'::bytea) = COALESCE(t2._value1_rtref, '\\xff'::bytea)) AND (COALESCE(_value1_rrref, '\\xff'::bytea) = COALESCE(t2._value1_rrref, '\\xff'::bytea)) AND (COALESCE(_value2_type, '\\xff'::bytea) = COALESCE(t2._value2_type, '\\xff'::bytea)) AND (COALESCE(_value2_rtref, '\\xff'::bytea) = COALESCE(t2._value2_rtref, '\\xff'::bytea)) AND (COALESCE(_value2_rrref, '\\xff'::bytea) = COALESCE(t2._value2_rrref, '\\xff'::bytea)) AND (_splitter = '0'::numeric))\"\"              Filter: ((COALESCE(t2._fld51171rref, '\\xff'::bytea) = COALESCE(_fld51171rref, '\\xff'::bytea)) AND (COALESCE(t2._fld51170rref, '\\xff'::bytea) = COALESCE(_fld51170rref, '\\xff'::bytea)) AND (COALESCE(t2._fld51169rref, '\\xff'::bytea) = COALESCE(_fld51169rref, '\\xff'::bytea)))\"\"              Estimated Fetched Rows: 30\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 <a href=\"https:\/\/explain.tensor.ru\/archive\/explain\/a45e8b6f76f9cd5d5eadba3165d93f1d:0:2026-10-14\">\u043f\u043b\u0430\u043d<\/a> \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/29\/d5\/a4\/29d5a4d159f27a9952fd7e8edde47717.png\" width=\"1262\" height=\"300\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/29\/d5\/a4\/29d5a4d159f27a9952fd7e8edde47717.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/29\/d5\/a4\/29d5a4d159f27a9952fd7e8edde47717.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 c Hash Join <strong>\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0441\u044f \u0437\u0430 18 \u0441\u0435\u043a\u0443\u043d\u0434<\/strong> \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u0447\u0430\u0441\u0430 \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 Nested Loop.\u00a0<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 (\u043e \u0442\u043e\u043c \u043a\u0430\u043a \u043c\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0438\u0441\u0430\u043b\u0438 <a href=\"https:\/\/infostart.ru\/1c\/articles\/2730745\/\">\u0442\u0443\u0442<\/a>), \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u0430 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u041f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0442\u0435\u0441\u0442\u043e\u0432 \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u043b\u043e \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<h2>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439?<\/h2>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0439 \u0442\u0443\u0442 \u0434\u0432\u0430.<\/p>\n<p>\u041d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0421\u0423\u0411\u0414 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0435\u043d\u0430 \u0432 Tantor Postgres 18.7. \u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u043d\u0435\u0439 \u0440\u0430\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0432\u044b\u0448\u043b\u0430 \u044d\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f, &#8212; \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043d\u0430\u043c, \u043f\u043e\u043c\u043e\u0436\u0435\u043c. \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 postgresql.conf:<\/p>\n<pre><code>enable_coalesce_estimation = onenable_multicolumn_stats_detail = on<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0412\u0442\u043e\u0440\u043e\u0435 &#8212; \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0431\u0435\u0440\u0435\u0442 Nested Loop, \u043d\u043e \u0432\u0441\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443, \u0431\u0435\u0437 \u0434\u043e\u0440\u043e\u0433\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0442\u044b\u0441\u044f\u0447 \u043b\u0438\u0448\u043d\u0438\u0445 \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435.<\/p>\n<hr\/>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044e \u043d\u0430 3 \u043c\u0435\u0441\u044f\u0446\u0430 \u043f\u043e <a href=\"https:\/\/tantorlabs.ru\/tantor-se-1c\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1103888\/\">https:\/\/habr.com\/ru\/articles\/1103888\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u044f\u0440\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0441\u0443\u0431\u0434 \u0441\u0438\u043b\u044c\u043d\u043e \u0434\u0435\u0433\u0440\u0430\u0434\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 mssql \u043d\u0430 postgresql.\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u041a \u043d\u0430\u043c \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442: \u043f\u043e\u0441\u043b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 MS SQL \u043d\u0430 Tantor Postgres 17 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043c\u0435\u0441\u044f\u0446\u0430 \u0432 1\u0421:ERP \u0441\u0442\u0430\u043b\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c 8 \u0447\u0430\u0441\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u043e 12 \u043c\u0438\u043d\u0443\u0442.\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Tantor Postgres, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u043b\u0438 \u043d\u0430\u0448\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043f\u043e\u0434 1\u0421. \u0421 \u043d\u0438\u043c\u0438 \u0431\u044b\u043b\u043e \u0432\u0441\u0435 \u043e\u043a, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e \u043d\u0438\u043c \u043c\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 auto_explain \u0441\u043e \u0441\u0431\u043e\u0440\u043e\u043c \u043f\u043b\u0430\u043d\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u043e\u043b\u0435\u0435 5 \u0441\u0435\u043a. \u0415\u0441\u043b\u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043c\u0435\u0441\u044f\u0446\u0430 \u0442\u043e\u0440\u043c\u043e\u0437\u0438\u0442 \u0438\u0437-\u0437\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043e\u043d\u0438 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043b\u043e\u0433\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u043b\u043e\u0433\u0438 \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430.\u0410\u043d\u0430\u043b\u0438\u0437 \u043b\u043e\u0433\u043e\u0432 \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u043f\u043e\u0447\u0442\u0438 8 \u0447\u0430\u0441\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u043e\u0441\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0442\u043e\u0433\u043e\u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438: \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e2, \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e3. \u0412\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u043c\u0435\u043b\u0438 2 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c\u00a0\u043f\u043b\u0430\u043d \u0442\u0430\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0435\u0433\u043e:\u0412\u044b\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (1), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438\u0442\u043e\u0433\u043e\u0432. \u0412\u0441\u0435\u0433\u043e 194 040 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 (2)\u0418\u0434\u0435\u0442 \u043b\u0435\u0432\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0438\u0442\u043e\u0433\u043e\u0432 \u043f\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0443, \u0441\u0447\u0435\u0442\u0443, \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e \u0441 \u0446\u0435\u043b\u044c\u044e \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0442\u044c\u00a0\u0442\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u0442\u043e\u0433\u043e\u0432 (\u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438\u0442\u043e\u0433\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 2\u0445 \u044d\u0442\u0430\u043f\u043e\u0432, \u043e \u043d\u0438\u0445 \u043d\u0438\u0436\u0435). \u0423\u0441\u043b\u043e\u0432\u0438\u0435 WHERE T2._Period IS NULL \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u0442\u043e\u0433\u043e\u0432.\u041f\u043e\u0438\u0441\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u0442\u043e\u0433\u043e\u0432 \u0438\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 accrgat3512031o (3). \u041d\u043e \u043d\u0435 \u0432\u0441\u0435 \u043f\u043e\u043b\u044f, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0438\u0434\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 2\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0435\u0441\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e Filter (4), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435. \u0418 \u0437\u0430 \u043e\u0434\u0438\u043d \u0446\u0438\u043a\u043b \u043f\u043e\u0438\u0441\u043a \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f 7336 \u0441\u0442\u0440\u043e\u043a (Rows Removed by Filter: 7336), \u044d\u0442\u043e \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 (5). \u0410 \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 194 \u0442\u044b\u0441\u044f\u0447\u0438 \u0441\u0442\u0440\u043e\u043a, \u0442\u043e \u043f\u043e\u0438\u0441\u043a \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0430 194 \u0442\u044b\u0441\u044f\u0447\u0438 \u0440\u0430\u0437 (6), \u0442.\u043a. \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 2\u0445 \u044d\u0442\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 Nested Loop (\u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0446\u0438\u043a\u043b\u044b) (7). \u0421\u0443\u043c\u043c\u0430\u0440\u043d\u043e \u0432 \u0443\u0437\u043b\u0435 index Scan \u0447\u0435\u0440\u0435\u0437 Filter \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u0442\u043e\u0440\u0430 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u0430 \u0441\u0442\u0440\u043e\u043a (8), \u0447\u0442\u043e \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u043f\u043b\u0430\u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 &#8212; 3 433 \u0441\u0435\u043a\u0443\u043d\u0434\u044b (9).\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 2 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0437 194 \u0442\u044b\u0441\u044f\u0447 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e 5520 \u0441\u0442\u0440\u043e\u043a (10), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438\u0442\u043e\u0433\u043e\u0432 (11).\u0412\u043e\u043e\u0431\u0449\u0435 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438\u0442\u043e\u0433\u043e\u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 2\u0445 \u044d\u0442\u0430\u043f\u043e\u0432:\u00a0\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 (INSERT) \u043f\u043e \u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0438\u043e\u0434\u0443, \u0441\u0447\u0435\u0442\u0443, \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0431\u044b\u043b\u043e \u0435\u0449\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u0442\u043e\u0433\u043e\u0432 &#8212; \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0432\u044b\u0448\u0435.\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 (UPDATE) \u043f\u043e \u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0438\u043e\u0434\u0443, \u0441\u0447\u0435\u0442\u0443, \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u0442\u043e\u0433\u043e\u0432 &#8212; \u0432\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u043e\u0433\u043e\u00a0\u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041f\u0440\u0438\u0447\u0438\u043d\u044b \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0443\u0442 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u043a\u0430\u043a \u0438 \u0432\u044b\u0448\u0435 &#8212; \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043f\u0440\u0438 Index Scan \u0432 \u0446\u0438\u043a\u043b\u0435.\u041f\u043e \u043f\u043b\u0430\u043d\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b: \u043f\u043e \u043a\u0430\u043a\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u043c\u044b\u0445 \u0441\u0442\u0440\u043e\u043a? \u0411\u044b\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445? \u0410 \u043c\u043e\u0436\u0435\u0442 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043e\u0448\u0438\u0431\u0441\u044f, \u0438 \u0432\u044b\u0431\u0440\u0430\u043b \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441?\u041d\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0435 \u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f.\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441 \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0442\u043e\u0433\u043e\u0432.\u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u044f \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b \u0442\u0438\u043f\u043e\u0432\u0443\u044e \u0434\u0435\u043c\u043e-\u0431\u0430\u0437\u0443 ERP 2.5.8. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438 &#171;\u0425\u043e\u0437\u0440\u0430\u0441\u0447\u0435\u0442\u043d\u044b\u0439&#187; \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a:\u041f\u0440\u0438\u0437\u043d\u0430\u043a \u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0439=\u043d\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u043e\u0434\u043a\u0438 \u0432 \u0434\u0435\u0431\u0435\u0442\u0435 \u0438 \u043a\u0440\u0435\u0434\u0438\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 (\u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430, \u0442.\u043a. \u0443 \u043d\u0435\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0439=\u0434\u0430).\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0442\u043e\u0433\u043e\u0432 \u043f\u043e \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e \u0438 \u0438\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432.\u041f\u043e \u0441\u0443\u0442\u0438 \u0441\u043e\u0441\u0442\u0430\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439, \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0442\u043e\u0433\u043e\u0432 \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0447\u0435\u0442\u0430\u043c \u0438 \u0418\u0442\u043e\u0433\u0438\u041c\u0435\u0436\u0434\u0443\u0421\u0447\u0435\u0442\u0430\u043c\u0438 \u043c\u044b \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c, \u0442.\u043a. \u0432 \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u043d\u0438 \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f.\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446:\u0418\u043d\u0434\u0435\u043a\u0441\u044b, \u043a\u0430\u043a \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e, \u043d\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u043c\u0435\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f:\u0418\u043d\u0434\u0435\u043a\u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0447\u0435\u0442\u0430\u043c\u0421\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e1 \u0438\u043c\u0435\u0435\u0442 \u0432 \u0441\u0432\u043e\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u043d\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0412\u0430\u043b\u044e\u0442\u0430 \u0438 \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0438\u043d\u0434\u0435\u043a\u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0447\u0435\u0442\u0430\u043c\u0421\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e2 \u0442\u043e\u043b\u044c\u043a\u043e \u0412\u0430\u043b\u044e\u0442\u0443, \u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0447\u0435\u0442\u0430\u043c\u0421\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e3 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0442 \u043d\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439. \u0410 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u0414\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0442 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445!\u00a0\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0442\u043e\u0433\u043e\u0432 \u043f\u043e \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e \u0435\u0441\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u201c\u043d\u0430\u043f\u0430\u0440\u043d\u0438\u043a\u201d. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0447\u0435\u0442\u0430\u043c\u0421\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e1 \u043f\u043e\u043c\u0438\u043c\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 AccRgAT1817851 \u0435\u0441\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 AccRgAT1817851ong. \u0421\u043e\u0441\u0442\u0430\u0432 \u043f\u043e\u043b\u0435\u0439 \u0443 \u044d\u0442\u0438\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432. \u041e\u0442\u043b\u0438\u0447\u0438\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e \u043f\u043e\u043b\u044f\u043c, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 NULL, \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f COALESCE.\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 AccRgAT1817851 \u043f\u043e\u043b\u0435 \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043a \u043f\u043e\u043b\u0435 Fld81745RRef, \u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u00a0AccRgAT181785_1ong \u043e\u043d\u043e \u0437\u0430\u0434\u0430\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 COALESCE(_Fld81745RRef, &#8216;\\xff&#8217;::bytea).\u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u043e\u0433 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 IsNull() \u0432 MS SQL Server, \u0442\u043e \u0435\u0441\u0442\u044c \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0435\u0440\u0432\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0432\u043d\u043e Null, \u0442\u043e \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430.\u0418 \u0437\u0434\u0435\u0441\u044c \u043c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430: \u0442.\u043a. \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0442\u043e\u0433\u043e\u0432 \u043f\u043e \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e 2 \u0438 3 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432\u0441\u0435\u0445 \u043d\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439, \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043d\u0438 \u043a\u0430\u043a \u0440\u0430\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u044e\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u044d\u0442\u0438\u043c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c. \u0422.\u0435. \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u0442\u043e\u0433\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438:\u041c\u044b \u0432\u0438\u0434\u0438\u043c 5 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0441\u0435 \u043f\u043e\u043b\u044f, \u043a\u0440\u043e\u043c\u0435 \u043f\u043e\u043b\u044f \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0418 \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0442\u043e\u0433\u0438 \u043f\u043e \u044d\u0442\u0438\u043c \u0432\u0441\u0435\u043c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c \u0438 \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044e &#171;\u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u04351&#187;, \u0442\u043e \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u044d\u0442\u0438 5 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0438 \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 Filter \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c 4 \u0438\u0437 \u043d\u0438\u0445, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 &lt;&gt; \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u04351:\u0422\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0441\u0442\u0435\u043d\u0434\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0432\u043e\u0434\u043e\u0432.\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b\u041f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c 3 \u0442\u044b\u0441\u044f\u0447\u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0432 \u0434\u0435\u043c\u043e-\u0431\u0430\u0437\u0435 ERP \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435\u043c &#171;\u0422\u0435\u0441\u0442N&#187;:\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438\u0442\u043e\u0433\u043e\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u0440\u043e\u043c\u0435 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043c &#171;\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f (\u0440\u0435\u0433\u043b\u0430\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0443\u0447\u0435\u0442)&#187;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u043a\u0438. \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0432 \u043d\u0435\u043c 3 \u0442\u044b\u0441\u044f\u0447\u0438 \u0441\u0442\u0440\u043e\u043a \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043a\u043e\u0434\u0430 \u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c:\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0435\u0433\u043e \u0438 \u0438\u0449\u0435\u043c \u0432 \u043b\u043e\u0433\u0435 \u0421\u0423\u0411\u0414 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0442\u043e\u0433\u043e\u0432 \u043f\u043e \u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e.\u00a0\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043b\u0430\u0441\u044c \u0438 \u0443 \u043d\u0430\u0441 \u0442\u0430\u043a\u0436\u0435 \u0438\u0434\u0435\u0442 \u0434\u043e\u043b\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0442\u043e\u0433\u043e\u0432 \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e3:\u0427\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432 \u043f\u043b\u0430\u043d\u0435:\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0442\u043e\u0433\u043e\u0432\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043d 3002 \u0440\u0430\u0437\u0430, \u0442.\u043a. \u0443 \u043d\u0430\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0446\u0438\u043a\u043b\u044b\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442\u0441\u044f 3050 \u0437\u0430\u043f\u0438\u0441\u0435\u0439\u0414\u0430\u043d\u043d\u044b\u0439 \u0443\u0437\u0435\u043b \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 3,5 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 &#8212; \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u0414\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043f\u043e\u043f\u0430\u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0442\u043e\u0440\u0435, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0441\u043c\u043e\u0442\u0440\u044e \u0441\u043e\u0441\u0442\u0430\u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0438 \u0432\u0438\u0436\u0443, \u0447\u0442\u043e \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e2, \u0418\u0442\u043e\u0433\u0438\u041f\u043e\u0421\u0443\u0431\u043a\u043e\u043d\u0442\u043e3 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0430\u0441\u044c &#8212; \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u043b\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0411\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0438\u0438.\u0425\u043e\u0437\u0440\u0430\u0441\u0447\u0435\u0442\u043d\u044b\u0439.\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u044f \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c Nested Loop (enable_nestloop = off) \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0447\u0435\u0440\u0435\u0437 Hash Join. \u0417\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u0437\u0430 0,1 \u0441\u0435\u043a\u0443\u043d\u0434\u044b (\u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430) &#8212; \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041e\u0442\u0441\u044e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e Hash Join \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0442\u043e\u0433\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0442\u0430\u0431\u043b\u0438\u0446. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442.\u041f\u043e\u0447\u0435\u043c\u0443 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 Hash Join\u041c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0431\u043e\u0440 Hash Join \u0432\u043c\u0435\u0441\u0442\u043e Nested Loop. \u041a\u0430\u043a \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u0437 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f Nested Loop?\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u043b\u0430\u043d\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 EXPLAIN, \u0431\u0435\u0437 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 ANALYZE, \u0442.\u043a. \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043e\u0446\u0435\u043d\u043a\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 &#8212; \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b.\u041f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441 Nested Loop:Update on _accrgat381787  (cost=0.16..1330.05 rows=0 width=0)&#187;&#187;  -&gt;  Nested Loop  (cost=0.16..1330.05 rows=1 width=652)&#187;&#187;        -&gt;  Seq Scan on tt19 t2  (cost=0.00..144.02 rows=3002 width=333)&#187;&#187;              Filter: ((_fld2830 = &#8216;0&#8217;::numeric) AND (_edcount = &#8216;3&#8217;::numeric))&#187;&#187;        -&gt;  Index Scan using _accrgat381787_1 on _accrgat381787  (cost=0.16..0.39 rows=1 width=324)&#187;&#187;              Index Cond: ((_fld2830 = &#8216;0&#8217;::numeric) AND (_accountrref = t2._accountrref) AND (_period = t2._period) AND (_fld81743rref = t2._fld81743rref) AND (_value1_type = t2._value1_type) AND (_value1_rtref = t2._value1_rtref) AND (_value1_rrref = t2._value1_rrref) AND (_value2_type = t2._value2_type) AND (_value2_rtref = t2._value2_rtref) AND (_value2_rrref = t2._value2_rrref) AND (_value3_type = t2._value3_type) AND (_value3_rtref = t2._value3_rtref) AND (_value3_rrref = t2._value3_rrref) AND (_splitter = &#8216;0&#8217;::numeric))&#187;&#187;              Filter: ((COALESCE(t2._fld81744rref, &#8216;\\\\xff&#8217;::bytea) = COALESCE(_fld81744rref, &#8216;\\\\xff&#8217;::bytea)) AND (COALESCE(t2._fld81745rref, &#8216;\\\\xff&#8217;::bytea) = COALESCE(_fld81745rref, &#8216;\\\\xff&#8217;::bytea)) AND (COALESCE(t2._fld81746rref, &#8216;\\\\xff&#8217;::bytea) = COALESCE(_fld81746rref, &#8216;\\\\xff&#8217;::bytea)))&#187;\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c Nested Loop = 1330.05.\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 &#171;SET enable_nestloop=off;&#187; \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0435\u0449\u0435 \u0440\u0430\u0437, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043b\u0430\u043d \u0441 Hash Join:Update on _accrgat381787  (cost=219.07..21766.70 rows=0 width=0)&#187;&#187;  -&gt;  Hash Join  (cost=219.07..21766.70 rows=1 width=652)&#187;&#187;        Hash Cond: ((_accrgat381787._period = t2._period) AND (_accrgat381787._accountrref = t2._accountrref) AND (_accrgat381787._fld81743rref = t2._fld81743rref) AND (COALESCE(_accrgat381787._fld81744rref, &#8216;\\\\xff&#8217;::bytea) = COALESCE(t2._fld81744rref, &#8216;\\\\xff&#8217;::bytea)) AND (COALESCE(_accrgat381787._fld81745rref, &#8216;\\\\xff&#8217;::bytea) = COALESCE(t2._fld81745rref, &#8216;\\\\xff&#8217;::bytea)) AND&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-501765","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/501765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=501765"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/501765\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=501765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=501765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=501765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}