blob: 91c75105b64c57382d4f6348917131832659f33a [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="copyright" content="(C) Copyright 2023" />
<meta name="DC.rights.owner" content="(C) Copyright 2023" />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="SCHEDULE_RANDOM_REPLICA Query Option (Impala 2.5 or higher only)" />
<meta name="DC.Relation" scheme="URI" content="../topics/impala_set.html" />
<meta name="prodname" content="Impala" />
<meta name="prodname" content="Impala" />
<meta name="version" content="Impala 3.4.x" />
<meta name="version" content="Impala 3.4.x" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="schedule_random_replica" />
<link rel="stylesheet" type="text/css" href="../commonltr.css" />
<title>SCHEDULE_RANDOM_REPLICA Query Option (Impala 2.5 or higher only)</title>
</head>
<body id="schedule_random_replica">
<h1 class="title topictitle1" id="ariaid-title1">SCHEDULE_RANDOM_REPLICA Query Option (<span class="keyword">Impala 2.5</span> or higher only)</h1>
<div class="body conbody">
<p class="p">
The <code class="ph codeph">SCHEDULE_RANDOM_REPLICA</code> query option fine-tunes the scheduling
algorithm for deciding which host processes each HDFS data block or Kudu tablet to reduce
the chance of CPU hotspots.
</p>
<p class="p">
By default, Impala estimates how much work each host has done for the query, and selects
the host that has the lowest workload. This algorithm is intended to reduce CPU hotspots
arising when the same host is selected to process multiple data blocks / tablets. Use the
<code class="ph codeph">SCHEDULE_RANDOM_REPLICA</code> query option if hotspots still arise for some
combinations of queries and data layout.
</p>
<p class="p">
The <code class="ph codeph">SCHEDULE_RANDOM_REPLICA</code> query option only applies to tables and
partitions that are not enabled for the HDFS caching.
</p>
<p class="p">
<strong class="ph b">Type:</strong> Boolean; recognized values are 1 and 0, or <code class="ph codeph">true</code> and
<code class="ph codeph">false</code>; any other value interpreted as <code class="ph codeph">false</code>
</p>
<p class="p">
<strong class="ph b">Default:</strong> <code class="ph codeph">false</code>
</p>
<p class="p">
<strong class="ph b">Added in:</strong> <span class="keyword">Impala 2.5.0</span>
</p>
<p class="p">
<strong class="ph b">Related information:</strong>
</p>
<p class="p">
<a class="xref" href="impala_perf_hdfs_caching.html#hdfs_caching">Using HDFS Caching with Impala (Impala 2.1 or higher only)</a>,
<a class="xref" href="impala_scalability.html#scalability_hotspots">Avoiding CPU Hotspots for HDFS Cached Data</a> ,
<a class="xref" href="impala_replica_preference.html#replica_preference">REPLICA_PREFERENCE Query Option (Impala 2.7 or higher only)</a>
</p>
</div>
<div class="related-links">
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/impala_set.html">SET Statement</a></div>
</div>
</div></body>
</html>