{"id":481522,"date":"2026-05-29T08:35:27","date_gmt":"2026-05-29T08:35:27","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=481522"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=481522","title":{"rendered":"\u041c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 Impala: \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c profile \u0438 \u043d\u0435 \u0432\u044b\u043d\u043e\u0441\u0438\u0442\u044c SQL \u043d\u0430\u0440\u0443\u0436\u0443"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u043e\u0433\u0434\u0430 Impala-\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0434\u043e\u043b\u044c\u0448\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e, \u043f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u043a\u0443\u0434\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0434\u0443\u0442 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c &#8212; query profile. \u0422\u0430\u043c \u0435\u0441\u0442\u044c \u043f\u043b\u0430\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0438, \u043e\u0446\u0435\u043d\u043a\u0438 \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u0430\u043c\u044f\u0442\u044c, scan-\u0447\u0430\u0441\u0442\u044c, exchange, admission, \u0445\u0432\u043e\u0441\u0442\u044b \u043f\u043e backend-\u0430\u043c \u0438 \u0434\u0440\u0443\u0433\u0430\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f. <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fff\/dcf\/65f\/fffdcf65fe280b8c407450edf5df6673.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/fff\/dcf\/65f\/fffdcf65fe280b8c407450edf5df6673.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fff\/dcf\/65f\/fffdcf65fe280b8c407450edf5df6673.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p> \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 profile \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u041e\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0432 \u043d\u0435\u043c \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0441\u0435\u043a\u0446\u0438\u0439, \u0447\u0430\u0441\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0432\u0438\u0434\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430\u043c\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0435\u0441\u0442\u044c \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: SQL-\u0442\u0435\u043a\u0441\u0442, \u0438\u043c\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438, resource pools, \u0445\u043e\u0441\u0442\u044b, \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/p>\n<ol>\n<li>\n<p>\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c profile \u0440\u0443\u043a\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c SQL \u0438 profile \u0432 LLM \u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u0442\u0430\u043a.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0430\u0434\u0435\u0436\u043d\u0435\u0435, \u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043e\u043f\u044b\u0442\u0430. \u0412\u0442\u043e\u0440\u043e\u0439 \u0443\u0434\u043e\u0431\u043d\u0435\u0435, \u043d\u043e \u043f\u043b\u043e\u0445\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0433\u0440\u0430\u043d\u0438\u0446\u0443: \u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0448\u043b\u0438 \u043d\u0430\u0440\u0443\u0436\u0443, \u043a\u0430\u043a\u0438\u0435 \u0444\u0430\u043a\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0437\u044f\u043b\u0430 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0438 \u0433\u0434\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430, \u0430 \u0433\u0434\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f <s>\u0433\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0430\u0446\u0438\u044f<\/s> \u0434\u043e\u0433\u0430\u0434\u043a\u0430.<\/p>\n<h3>\u0427\u0442\u043e \u0432 profile \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e<\/h3>\n<p>Impala profile &#8212; \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u043e\u0433. \u042d\u0442\u043e \u0441\u0440\u0435\u0437 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0442\u0430\u043c \u043d\u0435\u0442 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043e\u0431\u044b\u0447\u043d\u043e \u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>SQL \u0438 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0438\u043c\u0435\u043d\u0430 \u0431\u0430\u0437, \u0442\u0430\u0431\u043b\u0438\u0446, \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0438 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, pools, coordinator \u0438 backend-\u0445\u043e\u0441\u0442\u044b;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0431\u044a\u0435\u043c\u044b \u0447\u0442\u0435\u043d\u0438\u044f, runtime counters, memory estimates, spills;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 admission wait, skew, exchange pressure;<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u0441\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438 \u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441. \u0412\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043e\u043d\u0438 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0440\u0430\u0437\u044a\u0435\u0437\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0447\u0430\u0442\u0430\u043c \u0438 \u0442\u0438\u043a\u0435\u0442\u0430\u043c \u0431\u0435\u0437 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>\u041e\u0442\u0441\u044e\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043a \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0443: \u0441\u044b\u0440\u044b\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u0430 \u043d\u0430\u0440\u0443\u0436\u0443 \u0438 \u0432 UI \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435, \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b.<\/p>\n<h3>\u0427\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0441 \u0434\u0438\u0430\u0433\u043d\u043e\u0437\u043e\u043c \u00ab\u043d\u0430 \u0433\u043b\u0430\u0437\u00bb<\/h3>\n<p>\u0412 Impala \u0440\u0435\u0434\u043a\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0441\u0447\u0435\u0442\u0447\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u044f. \u041e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>Admission wait \u043c\u043e\u0436\u0435\u0442 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e\u0431 \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u043b\u0438\u043c\u0438\u0442\u0430\u0445 \u043f\u0443\u043b\u0430 \u0438\u043b\u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u043d\u043e \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043d\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 \u043f\u043b\u0430\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p>Memory pressure \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0440\u044f\u0434\u043e\u043c \u0441 join, aggregation \u0438\u043b\u0438 sort, \u043d\u043e \u0431\u0435\u0437 estimates, spills \u0438 \u0444\u043e\u0440\u043c\u044b \u043f\u043b\u0430\u043d\u0430 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u044b.<\/p>\n<\/li>\n<li>\n<p>Cardinality mismatch \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u043e\u043a \u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>Scan skew \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u0434\u0438\u0441\u0431\u0430\u043b\u0430\u043d\u0441 backend-\u043e\u0432, \u043d\u043e \u043d\u0443\u0436\u0435\u043d \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 scan volume, \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439 \u0438 layout \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p>Exchange wait \/ intermediate data movement \u0447\u0430\u0441\u0442\u043e \u0432\u0435\u0434\u0435\u0442 \u043a review join shape, pre-aggregation \u0438\u043b\u0438 filter pushdown.<\/p>\n<\/li>\n<li>\n<p>Writer\/fetch tail \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u0445\u0432\u043e\u0441\u0442 \u043f\u043e\u0441\u043b\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 storage-\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0432\u0430\u0436\u043d\u044b.\u00ab\u0415\u0441\u0442\u044c \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438\u00bb \u0438 \u00ab\u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u00bb \u2014 \u0440\u0430\u0437\u043d\u044b\u0435 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f. \u0412 production-\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0435 \u044d\u0442\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043d\u0435 \u043a\u043e\u0441\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f: \u043e\u0442 \u043d\u0435\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0438\u043b\u0438 \u0441\u0440\u0430\u0437\u0443 \u043c\u0435\u043d\u044f\u0442\u044c SQL, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443, \u043f\u0443\u043b \u0438\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<p>\u042f \u0441\u0434\u0435\u043b\u0430\u043b Query Doctor \u043a\u0430\u043a \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u043e \u043d\u0435 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0440\u0443\u0436\u0443 \u0441\u044b\u0440\u043e\u0439 operational context.<\/p>\n<p><a href=\"https:\/\/youtu.be\/rtBmnmS-Y10\" rel=\"noopener noreferrer nofollow\">\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0434\u0435\u043c\u043a\u0430 \u043d\u0430 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u043a\u0435<\/a><\/p>\n<h3>\u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d Query Doctor<\/h3>\n<p>\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Query Doctor \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 Apache Impala. \u0414\u0440\u0443\u0433\u0438\u0435 \u0434\u0432\u0438\u0436\u043a\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a roadmap, \u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f.<\/p>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Cloudera Manager, \u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0441\u0442\u044c, \u0438\u043b\u0438 \u0441 bounded direct impalad endpoints \u0434\u043b\u044f Recent, Running \u0438 \u043e\u0434\u043d\u043e\u0433\u043e Known Query ID workflow. \u0421\u0431\u043e\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c, read-only \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c.<\/p>\n<p>\u041e\u0431\u0449\u0438\u0439 workflow \u0442\u0430\u043a\u043e\u0439:<\/p>\n<ol>\n<li>\n<p>Collector \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 bounded read-only context.<\/p>\n<\/li>\n<li>\n<p>Analyzer \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0444\u0430\u043a\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>Scoring \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u043d\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u043b\u0438 \u0441\u0431\u043e\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0447\u0435\u0442 \u0438\u043b\u0438 optimizer review \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u044f\u0432\u043d\u043e \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e case.<\/p>\n<\/li>\n<li>\n<p>Report \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u0441\u0430\u043d\u0438\u0442\u0430\u0446\u0438\u044e \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p>\u0412 UI \u0438 trusted reports \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 raw SQL, raw profiles, raw metadata, local paths, secrets, model names, runtime internals, subprocess output \u0438 raw artifact filenames.<\/p>\n<\/li>\n<\/ol>\n<p>LLM \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0444\u0430\u043a\u0442\u043e\u0432. \u0415\u0433\u043e \u0440\u043e\u043b\u044c &#8212; \u043f\u043e\u043c\u043e\u0447\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 \u0443\u0436\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432. \u0415\u0441\u043b\u0438 \u0444\u0430\u043a\u0442\u043e\u0432 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 &#8212; \u201c\u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u201d, \u201c\u043d\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f\u201d \u0438\u043b\u0438 \u201cunknown\u201d, \u0430 \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e root cause.<\/p>\n<h3>\u0414\u0435\u043c\u043e \u043d\u0430 synthetic cases<\/h3>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/b61\/1e2\/5cc\/b611e25ccc5edf36b413b2740f4a5afc.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/b61\/1e2\/5cc\/b611e25ccc5edf36b413b2740f4a5afc.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/b61\/1e2\/5cc\/b611e25ccc5edf36b413b2740f4a5afc.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/1f3\/cd8\/a42\/1f3cd8a42361883988a97ad268421869.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/1f3\/cd8\/a42\/1f3cd8a42361883988a97ad268421869.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/1f3\/cd8\/a42\/1f3cd8a42361883988a97ad268421869.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u0434\u0435\u043c\u043e \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435. \u0412 \u043d\u0435\u043c \u043d\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 SQL, profiles, metadata, \u0445\u043e\u0441\u0442\u043e\u0432, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u043b\u0438 credentials.<\/p>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0434\u0435\u043c\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">python3 -m venv .venv. .venv\/bin\/activatepython -m pip install --upgrade pippython -m pip install query-doctorquery-doctor-demo-preflightquery-doctor-demo --out \/tmp\/query-doctor-demo-pack --overwritequery-doctor-web --batch-summary \/tmp\/query-doctor-demo-pack\/batch_summary.json<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u043c synthetic pack \u0435\u0441\u0442\u044c \u0442\u0440\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u0430.<\/p>\n<h4>\u041a\u0435\u0439\u0441 1: query-shape review candidate (demo-optimizer-0001)<\/h4>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 synthetic case \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 high query optimization candidate.<\/p>\n<p>\u0414\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u043a\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>synthetic duration: 315 \u0441\u0435\u043a\u0443\u043d\u0434;<\/p>\n<\/li>\n<li>\n<p>metadata status: not_requested;<\/p>\n<\/li>\n<li>\n<p>table stats status: not_checked;<\/p>\n<\/li>\n<li>\n<p>referenced tables: 2;<\/p>\n<\/li>\n<li>\n<p>collected metadata tables: 0;<\/p>\n<\/li>\n<li>\n<p>query optimization candidate: high;<\/p>\n<\/li>\n<li>\n<p>impact: high;<\/p>\n<\/li>\n<li>\n<p>confidence: high;<\/p>\n<\/li>\n<li>\n<p>cardinality anomalies: 4;<\/p>\n<\/li>\n<li>\n<p>memory anomalies: 3;<\/p>\n<\/li>\n<li>\n<p>zero\/unknown row estimate gaps: 2;<\/p>\n<\/li>\n<li>\n<p>zero\/unknown memory estimate gaps: 1;<\/p>\n<\/li>\n<li>\n<p>host-tail candidates: 1;<\/p>\n<\/li>\n<li>\n<p>reasons: join row expansion, large exchange\/intermediate movement, memory pressure around join\/aggregation operators;<\/p>\n<\/li>\n<li>\n<p>metadata \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0430\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0432\u043e\u0434\u044b \u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f unknown.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u044b\u0432\u043e\u0434: \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430 query-shape review. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c join keys, join cardinality, pre-aggregation \u0438 filter pushdown.<\/p>\n<p>\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434:<\/p>\n<pre><code>\u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0442\u043e\u0447\u043d\u043e \u0432 join'\u0430\u0445. \u0412\u043e\u0442 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 SQL, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c.<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0435\u0437\u043a\u0438\u0439. \u0415\u0441\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432, \u043d\u043e \u043d\u0435\u0442 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0438 \u043d\u0435\u0442 \u043f\u0440\u0430\u0432\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c SQL \u043a\u0430\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0443\u044e \u0437\u0430\u043c\u0435\u043d\u0443.<\/p>\n<h4>\u041a\u0435\u0439\u0441 2: stats maintenance candidate (demo-stats-0002)<\/h4>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 synthetic case \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 high stats optimization candidate.<\/p>\n<p>\u0414\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u043a\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>metadata status: collected;<\/p>\n<\/li>\n<li>\n<p>table stats status: missing or incomplete;<\/p>\n<\/li>\n<li>\n<p>referenced tables: 2;<\/p>\n<\/li>\n<li>\n<p>collected metadata tables: 2;<\/p>\n<\/li>\n<li>\n<p>stats optimization candidate: high;<\/p>\n<\/li>\n<li>\n<p>impact: high;<\/p>\n<\/li>\n<li>\n<p>confidence: medium;<\/p>\n<\/li>\n<li>\n<p>synthetic duration: 96 \u0441\u0435\u043a\u0443\u043d\u0434;<\/p>\n<\/li>\n<li>\n<p>cardinality anomalies: 3;<\/p>\n<\/li>\n<li>\n<p>memory anomalies: 1;<\/p>\n<\/li>\n<li>\n<p>zero\/unknown row estimate gaps: 3;<\/p>\n<\/li>\n<li>\n<p>zero\/unknown memory estimate gaps: 1;<\/p>\n<\/li>\n<li>\n<p>need type: table and column stats;<\/p>\n<\/li>\n<li>\n<p>required confirmation: \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c EXPLAIN \u0434\u043e\/\u043f\u043e\u0441\u043b\u0435 stats maintenance \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c comparable rerun.<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0440\u044b\u0433\u043d\u0443\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443. \u201cStats are missing\u201d \u0438 \u201cstats caused the slowdown\u201d &#8212; \u0440\u0430\u0437\u043d\u044b\u0435 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c metadata-\u0444\u0430\u043a\u0442\u0430\u043c\u0438. \u0412\u0442\u043e\u0440\u043e\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043b\u0430\u043d\u0430 \u0438 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u043e\u0433\u043e rerun.<\/p>\n<p><code>COMPUTE STATS<\/code> \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0435\u0442\u043a\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e statistics maintenance \u0438\u043c\u0435\u0435\u0442 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435.<\/p>\n<h4>\u041a\u0435\u0439\u0441 3: validator guardrail (demo-validator-0003)<\/h4>\n<p>\u0422\u0440\u0435\u0442\u0438\u0439 synthetic case \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<p>\u0414\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u043a\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>query optimization candidate: medium;<\/p>\n<\/li>\n<li>\n<p>impact: high;<\/p>\n<\/li>\n<li>\n<p>confidence: medium;<\/p>\n<\/li>\n<li>\n<p>synthetic duration: 188 \u0441\u0435\u043a\u0443\u043d\u0434;<\/p>\n<\/li>\n<li>\n<p>metadata status: not_requested;<\/p>\n<\/li>\n<li>\n<p>table stats status: not_checked;<\/p>\n<\/li>\n<li>\n<p>referenced tables: 3;<\/p>\n<\/li>\n<li>\n<p>collected metadata tables: 0;<\/p>\n<\/li>\n<li>\n<p>backend data skew: true;<\/p>\n<\/li>\n<li>\n<p>cardinality anomalies: 2;<\/p>\n<\/li>\n<li>\n<p>memory anomalies: 2;<\/p>\n<\/li>\n<li>\n<p>zero\/unknown row estimate gaps: 1;<\/p>\n<\/li>\n<li>\n<p>zero\/unknown memory estimate gaps: 1;<\/p>\n<\/li>\n<li>\n<p>host-tail candidates: 1;<\/p>\n<\/li>\n<li>\n<p>counter-signal: draft validation rejected unsafe shape change.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430. Query Doctor \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 SQL draft.<\/p>\n<p>\u0415\u0441\u043b\u0438 draft \u043c\u0435\u043d\u044f\u0435\u0442 shape \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u043b\u0438 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e, \u043e\u043d \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f trusted output. \u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u043c synthetic case rejected draft \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u0430\u043a untrusted partial output. \u042d\u0442\u043e \u043c\u0435\u043d\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u043d\u043e, \u0447\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 SQL, \u0437\u0430\u0442\u043e \u043d\u0435 \u043f\u043e\u0434\u043c\u0435\u043d\u044f\u0435\u0442 review \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u043e\u0439.<\/p>\n<h3>\u0427\u0442\u043e Query Doctor \u041d\u0415 \u0434\u0435\u043b\u0430\u0435\u0442<\/h3>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u044b, \u0447\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>Query Doctor:<\/p>\n<ul>\n<li>\n<p>\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 user SQL;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 optimizer draft SQL;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f root-cause \u043e\u0440\u0430\u043a\u0443\u043b\u043e\u043c;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Cloudera-\u0437\u0430\u0442\u043e\u0447\u0435\u043d\u044b\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u043e\u0431\u0435\u0449\u0430\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0432\u0441\u0435\u0445 query engines;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 raw profile \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 LLM output \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u0431\u0435\u0437 deterministic validation.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 engine &#8212; Apache Impala. \u0411\u0443\u0434\u0443\u0449\u0438\u0435 engine seams \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a roadmap, \u043d\u0435 \u043a\u0430\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<h3>\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e<\/h3>\n<p>\u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0447\u0430\u0441\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043a\u0440\u0430\u0439\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p>\u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b &#8212; \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u0440\u043e\u0444\u0438\u043b\u044f. \u041e\u043d \u0442\u043e\u0447\u043d\u044b\u0439, \u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043e\u043f\u044b\u0442\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430.<\/p>\n<p>\u0421 \u0434\u0440\u0443\u0433\u043e\u0439 &#8212; \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 LLM \u043f\u043e \u0441\u044b\u0440\u043e\u043c\u0443 SQL\/profile. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043d\u043e \u0447\u0430\u0441\u0442\u043e \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438 \u043f\u043b\u043e\u0445\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u0444\u0430\u043a\u0442\u044b \u0438 confidence.<\/p>\n<p>Query Doctor \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043d\u044f\u0442\u044c \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443:<\/p>\n<ul>\n<li>\n<p>\u0441\u043e\u0431\u0440\u0430\u0442\u044c bounded context \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e;<\/p>\n<\/li>\n<li>\n<p>\u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c deterministic facts;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c candidates, evidence \u0438 limitations;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0447\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 validation;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 follow-up checks.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0443\u0447\u043d\u0443\u044e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443. \u0421\u043a\u043e\u0440\u0435\u0435 \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u0434\u043e \u043c\u0435\u0441\u0442\u0430, \u0433\u0434\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435.<\/p>\n<h3>\u0413\u0434\u0435 \u043d\u0443\u0436\u0435\u043d feedback<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 Impala \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438, \u043c\u043d\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u043a\u0430\u043a\u0438\u0435 profile facts \u0432\u044b \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043f\u0440\u0438 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u0438\u0435 counters \u0438\u043b\u0438 \u0441\u0435\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u044e\u0442;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u0438\u0435 synthetic cases \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u043b\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438\/configuration, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0439 downstream tooling;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a\u0438\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u00abcandidate\u00bb, \u0430 \u043d\u0435 \u00abroot cause\u00bb.<\/p>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/github.com\/alexandrefimov\/Query-Doctor\" rel=\"noopener noreferrer nofollow\">\u041a\u043e\u0434 \u043d\u0430 \u0413\u0438\u0442\u0445\u0430\u0431\u0435<\/a><\/p>\n<p><a href=\"https:\/\/pypi.org\/project\/query-doctor\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0430\u043a\u0435\u0442<\/a><\/p>\n<p><a href=\"https:\/\/youtu.be\/rtBmnmS-Y10\" rel=\"noopener noreferrer nofollow\">\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0435 synthetic demo<\/a><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0435\u0439\u0441, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0430\u043d\u0438\u0442\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 SQL, profile, metadata, hosts, users \u0438 paths \u0438\u043b\u0438 \u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0431\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432.<\/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\/1041012\/\">https:\/\/habr.com\/ru\/articles\/1041012\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u043e\u0433\u0434\u0430 Impala-\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0434\u043e\u043b\u044c\u0448\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e, \u043f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u043a\u0443\u0434\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0434\u0443\u0442 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c &#8212; query profile. \u0422\u0430\u043c \u0435\u0441\u0442\u044c \u043f\u043b\u0430\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0438, \u043e\u0446\u0435\u043d\u043a\u0438 \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u0430\u043c\u044f\u0442\u044c, scan-\u0447\u0430\u0441\u0442\u044c, exchange, admission, \u0445\u0432\u043e\u0441\u0442\u044b \u043f\u043e backend-\u0430\u043c \u0438 \u0434\u0440\u0443\u0433\u0430\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f.  \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 profile \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u041e\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0432 \u043d\u0435\u043c \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0441\u0435\u043a\u0446\u0438\u0439, \u0447\u0430\u0441\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0432\u0438\u0434\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430\u043c\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0435\u0441\u0442\u044c \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: SQL-\u0442\u0435\u043a\u0441\u0442, \u0438\u043c\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438, resource pools, \u0445\u043e\u0441\u0442\u044b, \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c profile \u0440\u0443\u043a\u0430\u043c\u0438.\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c SQL \u0438 profile \u0432 LLM \u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u0442\u0430\u043a.\u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0430\u0434\u0435\u0436\u043d\u0435\u0435, \u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043e\u043f\u044b\u0442\u0430. \u0412\u0442\u043e\u0440\u043e\u0439 \u0443\u0434\u043e\u0431\u043d\u0435\u0435, \u043d\u043e \u043f\u043b\u043e\u0445\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0433\u0440\u0430\u043d\u0438\u0446\u0443: \u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0448\u043b\u0438 \u043d\u0430\u0440\u0443\u0436\u0443, \u043a\u0430\u043a\u0438\u0435 \u0444\u0430\u043a\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0437\u044f\u043b\u0430 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0438 \u0433\u0434\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430, \u0430 \u0433\u0434\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0433\u0430\u043b\u043b\u044e\u0446\u0438\u043d\u0430\u0446\u0438\u044f \u0434\u043e\u0433\u0430\u0434\u043a\u0430.\u0427\u0442\u043e \u0432 profile \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043eImpala profile &#8212; \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u043e\u0433. \u042d\u0442\u043e \u0441\u0440\u0435\u0437 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.\u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0442\u0430\u043c \u043d\u0435\u0442 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043e\u0431\u044b\u0447\u043d\u043e \u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438:SQL \u0438 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b;\u0438\u043c\u0435\u043d\u0430 \u0431\u0430\u0437, \u0442\u0430\u0431\u043b\u0438\u0446, \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0438 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439;\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, pools, coordinator \u0438 backend-\u0445\u043e\u0441\u0442\u044b;\u043e\u0431\u044a\u0435\u043c\u044b \u0447\u0442\u0435\u043d\u0438\u044f, runtime counters, memory estimates, spills;\u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 admission wait, skew, exchange pressure;\u043a\u043e\u0441\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438 \u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438.\u042d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441. \u0412\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043e\u043d\u0438 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0440\u0430\u0437\u044a\u0435\u0437\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0447\u0430\u0442\u0430\u043c \u0438 \u0442\u0438\u043a\u0435\u0442\u0430\u043c \u0431\u0435\u0437 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.\u041e\u0442\u0441\u044e\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043a \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0443: \u0441\u044b\u0440\u044b\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u0430 \u043d\u0430\u0440\u0443\u0436\u0443 \u0438 \u0432 UI \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435, \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b.\u0427\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0441 \u0434\u0438\u0430\u0433\u043d\u043e\u0437\u043e\u043c \u00ab\u043d\u0430 \u0433\u043b\u0430\u0437\u00bb\u0412 Impala \u0440\u0435\u0434\u043a\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0441\u0447\u0435\u0442\u0447\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u044f. \u041e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432.\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:Admission wait \u043c\u043e\u0436\u0435\u0442 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e\u0431 \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u043b\u0438\u043c\u0438\u0442\u0430\u0445 \u043f\u0443\u043b\u0430 \u0438\u043b\u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u043d\u043e \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043d\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 \u043f\u043b\u0430\u043d\u0430.Memory pressure \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0440\u044f\u0434\u043e\u043c \u0441 join, aggregation \u0438\u043b\u0438 sort, \u043d\u043e \u0431\u0435\u0437 estimates, spills \u0438 \u0444\u043e\u0440\u043c\u044b \u043f\u043b\u0430\u043d\u0430 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u044b.Cardinality mismatch \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u043e\u043a \u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443.Scan skew \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u0434\u0438\u0441\u0431\u0430\u043b\u0430\u043d\u0441 backend-\u043e\u0432, \u043d\u043e \u043d\u0443\u0436\u0435\u043d \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 scan volume, \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439 \u0438 layout \u0434\u0430\u043d\u043d\u044b\u0445.Exchange wait \/ intermediate data movement \u0447\u0430\u0441\u0442\u043e \u0432\u0435\u0434\u0435\u0442 \u043a review join shape, pre-aggregation \u0438\u043b\u0438 filter pushdown.Writer\/fetch tail \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u0445\u0432\u043e\u0441\u0442 \u043f\u043e\u0441\u043b\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 storage-\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0432\u0430\u0436\u043d\u044b.\u00ab\u0415\u0441\u0442\u044c \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438\u00bb \u0438 \u00ab\u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u00bb \u2014 \u0440\u0430\u0437\u043d\u044b\u0435 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f. \u0412 production-\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0435 \u044d\u0442\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043d\u0435 \u043a\u043e\u0441\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f: \u043e\u0442 \u043d\u0435\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0438\u043b\u0438 \u0441\u0440\u0430\u0437\u0443 \u043c\u0435\u043d\u044f\u0442\u044c SQL, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443, \u043f\u0443\u043b \u0438\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.\u042f \u0441\u0434\u0435\u043b\u0430\u043b Query Doctor \u043a\u0430\u043a \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u043e \u043d\u0435 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0440\u0443\u0436\u0443 \u0441\u044b\u0440\u043e\u0439 operational context.\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0434\u0435\u043c\u043a\u0430 \u043d\u0430 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u043a\u0435\u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d Query Doctor\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Query Doctor \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 Apache Impala. \u0414\u0440\u0443\u0433\u0438\u0435 \u0434\u0432\u0438\u0436\u043a\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a roadmap, \u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f.\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Cloudera Manager, \u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0441\u0442\u044c, \u0438\u043b\u0438 \u0441 bounded direct impalad endpoints \u0434\u043b\u044f Recent, Running \u0438 \u043e\u0434\u043d\u043e\u0433\u043e Known Query ID workflow. \u0421\u0431\u043e\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c, read-only \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c.\u041e\u0431\u0449\u0438\u0439 workflow \u0442\u0430\u043a\u043e\u0439:Collector \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 bounded read-only context.Analyzer \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0444\u0430\u043a\u0442\u044b.Scoring \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u043d\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u043b\u0438 \u0441\u0431\u043e\u0440 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438.\u041e\u0442\u0447\u0435\u0442 \u0438\u043b\u0438 optimizer review \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u044f\u0432\u043d\u043e \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e case.Report \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u0441\u0430\u043d\u0438\u0442\u0430\u0446\u0438\u044e \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e.\u0412 UI \u0438 trusted reports \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 raw SQL, raw profiles, raw metadata, local paths, secrets, model names, runtime internals, subprocess output \u0438 raw artifact filenames.LLM \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0444\u0430\u043a\u0442\u043e\u0432. \u0415\u0433\u043e \u0440\u043e\u043b\u044c &#8212; \u043f\u043e\u043c\u043e\u0447\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 \u0443\u0436\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432. \u0415\u0441\u043b\u0438 \u0444\u0430\u043a\u0442\u043e\u0432 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 &#8212; \u201c\u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u201d, \u201c\u043d\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f\u201d \u0438\u043b\u0438 \u201cunknown\u201d, \u0430 \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e root cause.\u0414\u0435\u043c\u043e \u043d\u0430 synthetic cases\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u0434\u0435\u043c\u043e \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435. \u0412 \u043d\u0435\u043c \u043d\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 SQL, profiles, metadata, \u0445\u043e\u0441\u0442\u043e\u0432, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u043b\u0438 credentials.\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0434\u0435\u043c\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0442\u0430\u043a:python3 -m venv .venv. .venv\/bin\/activatepython -m pip install &#8212;upgrade pippython -m pip install query-doctorquery-doctor-demo-preflightquery-doctor-demo &#8212;out \/tmp\/query-doctor-demo-pack &#8212;overwritequery-doctor-web &#8212;batch-summary \/tmp\/query-doctor-demo-pack\/batch_summary.json\u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u043c synthetic pack \u0435\u0441\u0442\u044c \u0442\u0440\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u0430.\u041a\u0435\u0439\u0441 1: query-shape review candidate (demo-optimizer-0001)\u041f\u0435\u0440\u0432\u044b\u0439 synthetic case \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 high query optimization candidate.\u0414\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u043a\u0442\u044b:synthetic duration: 315 \u0441\u0435\u043a\u0443\u043d\u0434;metadata status: not_requested;table stats status: not_checked;referenced tables: 2;collected metadata tables: 0;query optimization candidate: high;impact: high;confidence: high;cardinality anomalies: 4;memory anomalies: 3;zero\/unknown row estimate gaps: 2;zero\/unknown memory estimate gaps: 1;host-tail candidates: 1;reasons: join row expansion, large exchange\/intermediate movement, memory pressure around join\/aggregation operators;metadata \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0430\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0432\u043e\u0434\u044b \u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f unknown.\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u044b\u0432\u043e\u0434: \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430 query-shape review. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c join keys, join cardinality, pre-aggregation \u0438 filter pushdown.\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434:\u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0442\u043e\u0447\u043d\u043e \u0432 join&#8217;\u0430\u0445. \u0412\u043e\u0442 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 SQL, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c.\u0422\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0435\u0437\u043a\u0438\u0439. \u0415\u0441\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432, \u043d\u043e \u043d\u0435\u0442 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0438 \u043d\u0435\u0442 \u043f\u0440\u0430\u0432\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c SQL \u043a\u0430\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0443\u044e \u0437\u0430\u043c\u0435\u043d\u0443.\u041a\u0435\u0439\u0441 2: stats maintenance candidate (demo-stats-0002)\u0412\u0442\u043e\u0440\u043e\u0439 synthetic case \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 high stats optimization candidate.\u0414\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u043a\u0442\u044b:metadata status: collected;table stats status: missing or incomplete;referenced tables: 2;collected metadata tables: 2;stats optimization candidate: high;impact: high;confidence: medium;synthetic duration: 96 \u0441\u0435\u043a\u0443\u043d\u0434;cardinality anomalies: 3;memory anomalies: 1;zero\/unknown row estimate gaps: 3;zero\/unknown memory estimate gaps: 1;need type: table and column stats;required confirmation: \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c EXPLAIN \u0434\u043e\/\u043f\u043e\u0441\u043b\u0435 stats maintenance \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c comparable rerun.\u0417\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0440\u044b\u0433\u043d\u0443\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443. \u201cStats are missing\u201d \u0438 \u201cstats caused the slowdown\u201d &#8212; \u0440\u0430\u0437\u043d\u044b\u0435 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f.\u041f\u0435\u0440\u0432\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c metadata-\u0444\u0430\u043a\u0442\u0430\u043c\u0438. \u0412\u0442\u043e\u0440\u043e\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043b\u0430\u043d\u0430 \u0438 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u043e\u0433\u043e rerun.COMPUTE STATS \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0435\u0442\u043a\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e statistics maintenance \u0438\u043c\u0435\u0435\u0442 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435.\u041a\u0435\u0439\u0441 3: validator guardrail (demo-validator-0003)\u0422\u0440\u0435\u0442\u0438\u0439 synthetic case \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.\u0414\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u043a\u0442\u044b:query optimization candidate: medium;impact: high;confidence: medium;synthetic duration: 188 \u0441\u0435\u043a\u0443\u043d\u0434;metadata status: not_requested;table stats status: not_checked;referenced tables: 3;collected metadata tables: 0;backend data skew: true;cardinality anomalies: 2;memory anomalies: 2;zero\/unknown row estimate gaps: 1;zero\/unknown memory estimate gaps: 1;host-tail candidates: 1;counter-signal: draft validation rejected unsafe shape change.\u042d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430. Query Doctor \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 SQL draft.\u0415\u0441\u043b\u0438 draft \u043c\u0435\u043d\u044f\u0435\u0442 shape \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u043b\u0438 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e, \u043e\u043d \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f trusted output. \u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u043c synthetic case rejected draft \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u0430\u043a untrusted partial output. \u042d\u0442\u043e \u043c\u0435\u043d\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u043d\u043e, \u0447\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 SQL, \u0437\u0430\u0442\u043e \u043d\u0435 \u043f\u043e\u0434\u043c\u0435\u043d\u044f\u0435\u0442 review \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u043e\u0439.\u0427\u0442\u043e Query Doctor \u041d\u0415 \u0434\u0435\u043b\u0430\u0435\u0442\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u044b, \u0447\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438.Query Doctor:\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 user SQL;\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 optimizer draft SQL;\u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f root-cause \u043e\u0440\u0430\u043a\u0443\u043b\u043e\u043c;\u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Cloudera-\u0437\u0430\u0442\u043e\u0447\u0435\u043d\u044b\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c;\u043d\u0435 \u043e\u0431\u0435\u0449\u0430\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0432\u0441\u0435\u0445 query engines;\u043d\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 raw profile \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442;\u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 LLM output \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u0431\u0435\u0437 deterministic validation.\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 engine &#8212; Apache Impala. \u0411\u0443\u0434\u0443\u0449\u0438\u0435 engine seams \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a roadmap, \u043d\u0435 \u043a\u0430\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c.\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e\u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0447\u0430\u0441\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043a\u0440\u0430\u0439\u043d\u043e\u0441\u0442\u044f\u043c\u0438.\u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b &#8212; \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u0440\u043e\u0444\u0438\u043b\u044f. \u041e\u043d \u0442\u043e\u0447\u043d\u044b\u0439, \u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043e\u043f\u044b\u0442\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430.\u0421 \u0434\u0440\u0443\u0433\u043e\u0439 &#8212; \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 LLM \u043f\u043e \u0441\u044b\u0440\u043e\u043c\u0443 SQL\/profile. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043d\u043e \u0447\u0430\u0441\u0442\u043e \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438 \u043f\u043b\u043e\u0445\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u0444\u0430\u043a\u0442\u044b \u0438 confidence.Query Doctor \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043d\u044f\u0442\u044c \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443:\u0441\u043e\u0431\u0440\u0430\u0442\u044c bounded context \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e;\u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c deterministic facts;\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c candidates, evidence \u0438 limitations;\u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0447\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 validation;\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 follow-up checks.\u042d\u0442\u043e \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0443\u0447\u043d\u0443\u044e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443. \u0421\u043a\u043e\u0440\u0435\u0435 \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u0434\u043e \u043c\u0435\u0441\u0442\u0430, \u0433\u0434\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435.\u0413\u0434\u0435 \u043d\u0443\u0436\u0435\u043d feedback\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 Impala \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438, \u043c\u043d\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e:\u043a\u0430\u043a\u0438\u0435 profile facts \u0432\u044b \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043f\u0440\u0438 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430\u0445;\u043a\u0430\u043a\u0438\u0435 counters \u0438\u043b\u0438 \u0441\u0435\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u044e\u0442;\u043a\u0430\u043a\u0438\u0435 synthetic cases \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c;\u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u043b\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438\/configuration, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0439 downstream tooling;\u043a\u0430\u043a\u0438\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u00abcandidate\u00bb, \u0430 \u043d\u0435 \u00abroot cause\u00bb.\u041a\u043e\u0434 \u043d\u0430 \u0413\u0438\u0442\u0445\u0430\u0431\u0435\u041f\u0430\u043a\u0435\u0442\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0435 synthetic demo\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0435\u0439\u0441, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0430\u043d\u0438\u0442\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 SQL, profile, metadata, hosts, users \u0438 paths \u0438\u043b\u0438 \u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0431\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432.\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 https:\/\/habr.com\/ru\/articles\/1041012\/<\/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-481522","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/481522","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=481522"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/481522\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=481522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=481522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=481522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}