<br />
<b>Warning</b>:  Undefined array key "global_protection_id" in <b>/home/wikitechy/public_html/interview-questions/wp-content/plugins/content-protector/inc/class-ps-rest-handler.php</b> on line <b>51</b><br />
{"id":576,"date":"2021-07-13T21:50:34","date_gmt":"2021-07-13T21:50:34","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=576"},"modified":"2021-09-13T05:32:03","modified_gmt":"2021-09-13T05:32:03","slug":"what-is-a-tool-for-tuning-hive-queries","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/","title":{"rendered":"What is a tool for tuning hive queries ?"},"content":{"rendered":"<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"tool-for-tuning-hive-queries\" class=\"color-green\" style=\"text-align: justify;\">Tool for tuning hive queries<\/h2>\n<\/div>\n<\/div>\n<div class=\"ImageContent\" style=\"text-align: justify;\">\n<div class=\"hddn\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-medium aligncenter\" src=\"https:\/\/cdn.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries.png\" alt=\"tool for tuning hive queries\" width=\"732\" height=\"538\" \/><\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"1-enable-compression-in-hive\" class=\"color-green\">1. Enable Compression in Hive<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>By doing compression at various phases (i.e. on final output, intermediate data),we achieve performance improvement in Hive Queries.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"text-center row\" style=\"text-align: justify;\"><\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"2-optimize-joins\" class=\"color-green\">2. Optimize Joins<\/h2>\n<\/div>\n<\/div>\n<p style=\"text-align: justify;\">We can improve the performance of joins.By enabling Auto Convert Map Joins and enabling optimization of skew join.<\/p>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ol>\n<li>Auto Map Join<\/li>\n<li>Skew Joins<\/li>\n<li>Enable Bucketed Map Joins<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"auto-map-join\">Auto Map Join:<\/h2>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Auto Map-Join is useful feature when joining a big table with a small table.<\/li>\n<li>If we enable this feature, the small table will be saved in the local cache on each node, joined with the big table in the Map phase.<\/li>\n<li>Enabling Auto Map Join provides 2 advantages.<\/li>\n<li>Primary,it loads a small table into cache will save read time on each data node.<\/li>\n<li>Secondary, it avoids skew joins in the Hive query, since the join operation has been already done in the Map phase for each block of data.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"skew-joins\">Skew joins:<\/h2>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>We enable skew joins by setting hive.optimize.<\/li>\n<li>Skew join property SET command in hive shell or hive-site.xml file.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"enable-bucketed-map-joins\">Enable Bucketed Map Joins<\/h2>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>The tables as specific column and tables used in joins to improve performance bucketed map join is used.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"3-enable-parallel-execution\" class=\"color-green\">3. Enable Parallel Execution<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Hive converts a query into more stages.The MapReduce stage, sampling stage, a mergestage and a limit stage.<\/li>\n<li>By default, Hive executes only one time for these satges.<\/li>\n<li>A particular job may consist of some stages that are not dependent on each other and could be executed in parallel, possibly allowing the overall job to complete more quickly.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"4-single-reduce-for-multi-group-by\" class=\"color-green\">4. Single Reduce for Multi Group BY<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>The single reducer used for multi operations, it combine multiple GROUP BY operations in a query into a single MapReduce job<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"5-enable-vectorization\" class=\"color-green\">5. Enable Vectorization<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Vectorization introduced into hive for the first time in hive-0.13.1 release only<\/li>\n<li>It improve operations like scans, aggregations, filters and joins, batches of 1024 rows for each time.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"6-enable-cost-based-optimization\" class=\"color-green\">6. Enable Cost Based Optimization<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\">\n<div class=\"hddn\">\n<ul>\n<li style=\"text-align: justify;\">It provided the cost based optimization, based on query cost, resulting in different decisions: how to order joins, which type of join to perform and degree of parallelism.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Answer : By doing compression at various phases (i.e. on final output, intermediate data),we achieve performance improvement in Hive Queries.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"passster_activate_protection":false,"passster_protect_child_pages":"","passster_protection_type":"password","passster_password":"","passster_activate_overwrite_defaults":"","passster_headline":"","passster_instruction":"","passster_placeholder":"","passster_button":"","passster_id":"","passster_activate_misc_settings":"","passster_redirect_url":"","passster_hide":"no","passster_area_shortcode":"","gtb_hide_title":false,"gtb_wrap_title":false,"gtb_class_title":"","gtb_remove_headerfooter":false,"footnotes":""},"categories":[3782],"tags":[195,971,3799,203,199,214,209,3878,205,222,484,3881,3876,621,3877,3880,620,3882,196,3716,712,970,366,477,208,288,483,976,975,200,974,197,280,364,3879,968,216,2119,969],"class_list":["post-576","post","type-post","status-publish","format-standard","hentry","category-hive","tag-accenture-interview-questions-and-answers","tag-altimetrik-india-pvt-ltd-interview-questions-and-answers","tag-ani-technologies-pvt-ltd-interview-questions-and-answers","tag-capgemini-interview-questions-and-answers","tag-casting-networks-india-pvt-limited-interview-questions-and-answers","tag-cgi-group-inc-interview-questions-and-answers","tag-collabera-technologies-interview-questions-and-answers","tag-cost-based-query-optimization-in-hive","tag-dell-international-services-india-pvt-ltd-interview-questions-and-answers","tag-flipkart-interview-questions-and-answers","tag-genpact-interview-questions-and-answers","tag-hive-performance-tuning-hortonworks","tag-hive-performance-tuning-techniques","tag-hive-query-based-interview-questions","tag-hive-query-optimization-parameters","tag-hive-query-optimization-techniques","tag-hive-scenario-based-interview-questions","tag-how-will-you-optimize-hive-performance","tag-ibm-interview-questions-and-answers","tag-impetus-technologies-interview-questions-and-answers","tag-indiabulls-technology-solutions-ltd-interview-questions-and-answers","tag-mindtree-interview-questions-and-answers","tag-netapp-interview-questions-and-answers","tag-pig-interview-questions","tag-prokarma-softech-pvt-ltd-interview-questions-and-answers","tag-r-systems-interview-questions-and-answers","tag-reliance-industries-ltd-interview-questions-and-answers","tag-synechron-te-interview-questions-and-answers","tag-tata-consultancy-service-interview-questions-and-answers","tag-tech-mahindra-interview-questions-and-answers","tag-trigent-software-interview-questions-and-answers","tag-unitedhealth-group-interview-questions-and-answers","tag-virtusa-consulting-services-pvt-ltd-interview-questions-and-answers","tag-wells-fargo-interview-questions-and-answers","tag-will-the-reducer-work-or-not-if-you-use-limit-1-in-any-hiveql-query","tag-wipro-infotech-interview-questions-and-answers","tag-wipro-interview-questions-and-answers","tag-yash-technologies-interview-questions-and-answers","tag-yodlee-infotech-pvt-ltd-interview-questions-and-answers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is a tool for tuning hive queries ? - Hive interview questions<\/title>\n<meta name=\"description\" content=\"What is a tool for tuning hive queries ? - hive interview questions and answers for experienced - By enabling compression at various phases\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is a tool for tuning hive queries ? - Hive interview questions\" \/>\n<meta property=\"og:description\" content=\"What is a tool for tuning hive queries ? - hive interview questions and answers for experienced - By enabling compression at various phases\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-13T21:50:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-13T05:32:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries.png\" \/>\n<meta name=\"author\" content=\"Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/\",\"name\":\"What is a tool for tuning hive queries ? - Hive interview questions\",\"isPartOf\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdn.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries.png\",\"datePublished\":\"2021-07-13T21:50:34+00:00\",\"dateModified\":\"2021-09-13T05:32:03+00:00\",\"author\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757\"},\"description\":\"What is a tool for tuning hive queries ? - hive interview questions and answers for experienced - By enabling compression at various phases\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/#primaryimage\",\"url\":\"https:\/\/cdn.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries.png\",\"contentUrl\":\"https:\/\/cdn.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries.png\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757\",\"name\":\"Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"caption\":\"Editor\"},\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/author\/editor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is a tool for tuning hive queries ? - Hive interview questions","description":"What is a tool for tuning hive queries ? - hive interview questions and answers for experienced - By enabling compression at various phases","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/","og_locale":"en_US","og_type":"article","og_title":"What is a tool for tuning hive queries ? - Hive interview questions","og_description":"What is a tool for tuning hive queries ? - hive interview questions and answers for experienced - By enabling compression at various phases","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/","og_site_name":"Wikitechy","article_published_time":"2021-07-13T21:50:34+00:00","article_modified_time":"2021-09-13T05:32:03+00:00","og_image":[{"url":"https:\/\/cdn.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries.png"}],"author":"Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Editor","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/","name":"What is a tool for tuning hive queries ? - Hive interview questions","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/#primaryimage"},"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries.png","datePublished":"2021-07-13T21:50:34+00:00","dateModified":"2021-09-13T05:32:03+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"description":"What is a tool for tuning hive queries ? - hive interview questions and answers for experienced - By enabling compression at various phases","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries\/#primaryimage","url":"https:\/\/cdn.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries.png","contentUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/hive\/what-is-a-tool-for-tuning-hive-queries.png"},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757","name":"Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","caption":"Editor"},"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/editor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=576"}],"version-history":[{"count":3,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/576\/revisions"}],"predecessor-version":[{"id":3462,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/576\/revisions\/3462"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}