blob: 5c8f09458b1ec913bf31329d23ef8abb7d8da07f [file] [log] [blame]
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>tmudr: tmudr::UDRPlanInfo Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<img id="MSearchSelect" src="search/search.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</div>
</li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
<div class="navpath"><b>tmudr</b>::<a class="el" href="classtmudr_1_1UDRPlanInfo.html">UDRPlanInfo</a>
</div>
</div>
<div class="contents">
<h1>tmudr::UDRPlanInfo Class Reference</h1><!-- doxytag: class="tmudr::UDRPlanInfo" --><!-- doxytag: inherits="tmudr::TMUDRSerializableObject" -->
<p>Describes the query plan used for a <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> invocation.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="sqludr_8h_source.html">sqludr.h</a>&gt;</code></p>
<p>Inherits tmudr::TMUDRSerializableObject.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtmudr_1_1UDRPlanInfo.html#ac65dd2b236e8f48c00c9b69efed78d19">SpecialDegreeOfParallelism</a> { <a class="el" href="classtmudr_1_1UDRPlanInfo.html#ac65dd2b236e8f48c00c9b69efed78d19ad2a2dc16a27a8570ae00f68ea6126f42">ANY_DEGREE_OF_PARALLELISM</a> = 0,
<a class="el" href="classtmudr_1_1UDRPlanInfo.html#ac65dd2b236e8f48c00c9b69efed78d19a1e33ba932a38eb933afc90e4963ec9b5">DEFAULT_DEGREE_OF_PARALLELISM</a> = -1,
<a class="el" href="classtmudr_1_1UDRPlanInfo.html#ac65dd2b236e8f48c00c9b69efed78d19a521c09523839fae6c72ccc9519ca971a">MAX_DEGREE_OF_PARALLELISM</a> = -2,
<a class="el" href="classtmudr_1_1UDRPlanInfo.html#ac65dd2b236e8f48c00c9b69efed78d19afb640839034de9ed8b6fffe6c172f06d">ONE_INSTANCE_PER_NODE</a> = -3
}</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Special degrees of parallelism. </p>
<a href="classtmudr_1_1UDRPlanInfo.html#ac65dd2b236e8f48c00c9b69efed78d19">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtmudr_1_1UDRPlanInfo.html#ac8f8d0cba4c48f24f787f036019dc120">getPlanNum</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtmudr_1_1UDRPlanInfo.html#a6617be36d31c31dd96685b8fe07f0efa">getCostPerRow</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtmudr_1_1UDRPlanInfo.html#ac856607de40f3bd6813adbd6a0da7ee4">getDesiredDegreeOfParallelism</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtmudr_1_1UDRPlanInfo.html#a2432b7bbc63ed88aaffc3f4d3a5c4a30">setCostPerRow</a> (long nanoseconds)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtmudr_1_1UDRPlanInfo.html#a2c04c1d3f7f28bd58b163d85deb02d3d">setDesiredDegreeOfParallelism</a> (int dop)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtmudr_1_1UDRWriterCompileTimeData.html">UDRWriterCompileTimeData</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtmudr_1_1UDRPlanInfo.html#a73487ea5456ec8a53d52a66813589976">getUDRWriterCompileTimeData</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtmudr_1_1UDRPlanInfo.html#a9699b7abd3e69cb9ea15bc999f424cc0">setUDRWriterCompileTimeData</a> (<a class="el" href="classtmudr_1_1UDRWriterCompileTimeData.html">UDRWriterCompileTimeData</a> *compileTimeData)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtmudr_1_1UDRPlanInfo.html#ac95f99f26ba311d31875a87c1bc75672">addPlanData</a> (const char *planData, int planDataLength)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtmudr_1_1UDRPlanInfo.html#a57aadeeb3f77fd63b7b9059b84043a2c">getPlanData</a> (int &amp;planDataLength)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtmudr_1_1UDRPlanInfo.html#af33a0f91b8d1c791f72515cb246af21d">print</a> ()</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Describes the query plan used for a <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> invocation. </p>
<p>Objects of this type are used together with <a class="el" href="classtmudr_1_1UDRInvocationInfo.html" title="Describes an invocation of a UDR.">UDRInvocationInfo</a> objects and they contain additional info on plan-related such as the chosen partitioning and ordering. </p>
<hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="ac65dd2b236e8f48c00c9b69efed78d19"></a><!-- doxytag: member="tmudr::UDRPlanInfo::SpecialDegreeOfParallelism" ref="ac65dd2b236e8f48c00c9b69efed78d19" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classtmudr_1_1UDRPlanInfo.html#ac65dd2b236e8f48c00c9b69efed78d19">tmudr::UDRPlanInfo::SpecialDegreeOfParallelism</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Special degrees of parallelism. </p>
<p>Values that can be used in the <a class="el" href="classtmudr_1_1UDRPlanInfo.html#a2c04c1d3f7f28bd58b163d85deb02d3d">setDesiredDegreeOfParallelism()</a> method, in addition to positive numbers for the degree of parallelism (DoP). </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ac65dd2b236e8f48c00c9b69efed78d19ad2a2dc16a27a8570ae00f68ea6126f42"></a><!-- doxytag: member="ANY_DEGREE_OF_PARALLELISM" ref="ac65dd2b236e8f48c00c9b69efed78d19ad2a2dc16a27a8570ae00f68ea6126f42" args="" -->ANY_DEGREE_OF_PARALLELISM</em>&nbsp;</td><td>
<p>Optimizer decides DoP. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac65dd2b236e8f48c00c9b69efed78d19a1e33ba932a38eb933afc90e4963ec9b5"></a><!-- doxytag: member="DEFAULT_DEGREE_OF_PARALLELISM" ref="ac65dd2b236e8f48c00c9b69efed78d19a1e33ba932a38eb933afc90e4963ec9b5" args="" -->DEFAULT_DEGREE_OF_PARALLELISM</em>&nbsp;</td><td>
<p>Optimizer decides DoP based on dataflow heuristics. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac65dd2b236e8f48c00c9b69efed78d19a521c09523839fae6c72ccc9519ca971a"></a><!-- doxytag: member="MAX_DEGREE_OF_PARALLELISM" ref="ac65dd2b236e8f48c00c9b69efed78d19a521c09523839fae6c72ccc9519ca971a" args="" -->MAX_DEGREE_OF_PARALLELISM</em>&nbsp;</td><td>
<p>Execute the UDF with the largest degree of parallelism allowed. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac65dd2b236e8f48c00c9b69efed78d19afb640839034de9ed8b6fffe6c172f06d"></a><!-- doxytag: member="ONE_INSTANCE_PER_NODE" ref="ac65dd2b236e8f48c00c9b69efed78d19afb640839034de9ed8b6fffe6c172f06d" args="" -->ONE_INSTANCE_PER_NODE</em>&nbsp;</td><td>
<p>Execute one instance of the on every Trafodion node. Used internally for maintenance UDFs. </p>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac95f99f26ba311d31875a87c1bc75672"></a><!-- doxytag: member="tmudr::UDRPlanInfo::addPlanData" ref="ac95f99f26ba311d31875a87c1bc75672" args="(const char *planData, int planDataLength)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void UDRPlanInfo::addPlanData </td>
<td>(</td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>planData</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>planDataLength</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Attach a byte array to the plan to be sent to the runtime instances.</p>
<p>Compile time and runtime interfaces of the <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> can be called from different processes, since UDRs can be executed in parallel and on different nodes. If the <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> writer would like to carry state from the compiler interface calls to runtime calls, the best way to achieve this to attach it using this call and to retrieve the state at runtime using the <a class="el" href="classtmudr_1_1UDRPlanInfo.html#a57aadeeb3f77fd63b7b9059b84043a2c">getPlanData()</a> call.</p>
<p>The best place to use this method is from within <a class="el" href="classtmudr_1_1UDR.html#a36eaba4ea82ca80b2f3c25c7bdee871f">UDR::completeDescription()</a> method, since this method is called on the optimal plan that will be used at runtime. It can also be called from other methods, and the plan data will be discarded if the plan is not chosen.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classtmudr_1_1UDRPlanInfo.html#a57aadeeb3f77fd63b7b9059b84043a2c">getPlanData()</a></dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>planData</em>&nbsp;</td><td>A byte array, content defined by the <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> writer, to be sent to all runtime instances executing the <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a>. The buffer can and should be deleted by the caller after calling this method. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>planDataLength</em>&nbsp;</td><td>Length, in bytes, of the planData. </td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classtmudr_1_1UDRException.html" title="This is the exception to throw when an error occurs in a UDR.">UDRException</a></em>&nbsp;</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a6617be36d31c31dd96685b8fe07f0efa"></a><!-- doxytag: member="tmudr::UDRPlanInfo::getCostPerRow" ref="a6617be36d31c31dd96685b8fe07f0efa" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long UDRPlanInfo::getCostPerRow </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the cost of the <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> per row, approximately in nanoseconds.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classtmudr_1_1UDRPlanInfo.html#a2432b7bbc63ed88aaffc3f4d3a5c4a30">setCostPerRow()</a> </dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Cost of the <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> per row, in nanoseconds, for optimization purposes. </dd></dl>
</div>
</div>
<a class="anchor" id="ac856607de40f3bd6813adbd6a0da7ee4"></a><!-- doxytag: member="tmudr::UDRPlanInfo::getDesiredDegreeOfParallelism" ref="ac856607de40f3bd6813adbd6a0da7ee4" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int UDRPlanInfo::getDesiredDegreeOfParallelism </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the desired degree of parallelism for this plan.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classtmudr_1_1UDRPlanInfo.html#a2c04c1d3f7f28bd58b163d85deb02d3d">setDesiredDegreeOfParallelism()</a> </dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Degree of parallelism to be used for this plan alternative (positive) or one of the enum values in <a class="el" href="classtmudr_1_1UDRPlanInfo.html#ac65dd2b236e8f48c00c9b69efed78d19" title="Special degrees of parallelism.">UDRPlanInfo::SpecialDegreeOfParallelism</a> (zero or negative). </dd></dl>
</div>
</div>
<a class="anchor" id="a57aadeeb3f77fd63b7b9059b84043a2c"></a><!-- doxytag: member="tmudr::UDRPlanInfo::getPlanData" ref="a57aadeeb3f77fd63b7b9059b84043a2c" args="(int &amp;planDataLength)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char * UDRPlanInfo::getPlanData </td>
<td>(</td>
<td class="paramtype">int &amp;&nbsp;</td>
<td class="paramname"> <em>planDataLength</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Retrieve plan data attached to the <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> invocation and plan.</p>
<p>This method can be called at runtime to get state generated at compile time.</p>
<dl class="see"><dt><b>See also:</b></dt><dd>setPlanData()</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>planDataLength</em>&nbsp;</td><td>(out) Length of returned plan data. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to a byte array with plan data generated by the <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> writer at compile time. </dd></dl>
</div>
</div>
<a class="anchor" id="ac8f8d0cba4c48f24f787f036019dc120"></a><!-- doxytag: member="tmudr::UDRPlanInfo::getPlanNum" ref="ac8f8d0cba4c48f24f787f036019dc120" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int UDRPlanInfo::getPlanNum </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get a unique id for a given plan within a <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> invocation.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Plan number for this object, relative to the invocation. </dd></dl>
</div>
</div>
<a class="anchor" id="a73487ea5456ec8a53d52a66813589976"></a><!-- doxytag: member="tmudr::UDRPlanInfo::getUDRWriterCompileTimeData" ref="a73487ea5456ec8a53d52a66813589976" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classtmudr_1_1UDRWriterCompileTimeData.html">UDRWriterCompileTimeData</a> * UDRPlanInfo::getUDRWriterCompileTimeData </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get data to persist between calls of the optimizer interface</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classtmudr_1_1UDRPlanInfo.html#a9699b7abd3e69cb9ea15bc999f424cc0">setUDRWriterCompileTimeData()</a> </dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> writer-specific data that was previously attached or NULL. </dd></dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classtmudr_1_1UDRException.html" title="This is the exception to throw when an error occurs in a UDR.">UDRException</a></em>&nbsp;</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="af33a0f91b8d1c791f72515cb246af21d"></a><!-- doxytag: member="tmudr::UDRPlanInfo::print" ref="af33a0f91b8d1c791f72515cb246af21d" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void UDRPlanInfo::print </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Print the object, for use in debugging.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classtmudr_1_1UDRInvocationInfo.html#ab6b34603b9cad093f862ff650aeb361ea6b367b009643535ace09423ae914e549" title="128">UDRInvocationInfo::PRINT_INVOCATION_INFO_AT_RUN_TIME</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a2432b7bbc63ed88aaffc3f4d3a5c4a30"></a><!-- doxytag: member="tmudr::UDRPlanInfo::setCostPerRow" ref="a2432b7bbc63ed88aaffc3f4d3a5c4a30" args="(long nanoseconds)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void UDRPlanInfo::setCostPerRow </td>
<td>(</td>
<td class="paramtype">long&nbsp;</td>
<td class="paramname"> <em>nanoseconds</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the cost of the <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> per row, approximately in nanoseconds.</p>
<p>Specifying a cost can help with query plan issues. Note that the operator cost ("EST_OPER_COST") in EXPLAIN is not directly related to the nanosecond value specified here: </p>
<ul>
<li>
For parallel plans (those under an ESP_EXCHANGE), the cost is calculated for one parallel instance only. </li>
<li>
The cost in nanoseconds is converted to internal units (see CQD NCM_UDR_NANOSEC_FACTOR). </li>
<li>
The EXPLAIN cost contains additional factors, accounting for the cost to send input data to the process that executes the <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> and for sending back the result. </li>
</ul>
<p>The default implementation estimates the cost to be approximately 100 * sqrt(out().getRecordLength()). Therefore, a value of 1000 might be a good starting point for a cost per row estimate, assuming an output row length of about 1 KB. Increase this for more complex UDFs or for wider result rows, decrease it for simpler UDFs or shorter result rows.</p>
<p>Only use this method from within the <a class="el" href="classtmudr_1_1UDR.html#ae7bc614d12d011fc5f6d799abcc91935">UDR::describeDesiredDegreeOfParallelism()</a> method.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classtmudr_1_1UDR.html#ae7bc614d12d011fc5f6d799abcc91935">UDR::describeDesiredDegreeOfParallelism()</a> </dd>
<dd>
<a class="el" href="classtmudr_1_1UDRPlanInfo.html#a6617be36d31c31dd96685b8fe07f0efa">getCostPerRow()</a> </dd>
<dd>
UDR::TupleInfo::getRecordLength() </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>nanoseconds</em>&nbsp;</td><td>Cost of the <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> per row, in nanoseconds, for optimization purposes. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a2c04c1d3f7f28bd58b163d85deb02d3d"></a><!-- doxytag: member="tmudr::UDRPlanInfo::setDesiredDegreeOfParallelism" ref="a2c04c1d3f7f28bd58b163d85deb02d3d" args="(int dop)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void UDRPlanInfo::setDesiredDegreeOfParallelism </td>
<td>(</td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>dop</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the desired degree of parallelism.</p>
<p>Only use this method from within the <a class="el" href="classtmudr_1_1UDR.html#ae7bc614d12d011fc5f6d799abcc91935">UDR::describeDesiredDegreeOfParallelism()</a> method.</p>
<p>Here are some special values that can be set, in addition to positive numbers. These are defined in class <a class="el" href="classtmudr_1_1UDRPlanInfo.html" title="Describes the query plan used for a UDR invocation.">UDRPlanInfo</a>.</p>
<ul>
<li><code>ANY_DEGREE_OF_PARALLELISM:</code> This will allow the optimizer to choose any degree of parallelism, including 1 (serial execution) </li>
<li><code>DEFAULT_DEGREE_OF_PARALLELISM:</code> Currently the same as ANY_DEGREE_OF_PARALLELISM. The optimizer will use a heuristic based on the estimated cardinality (which you can set in the <a class="el" href="classtmudr_1_1UDR.html#a371a0c6d1dce6857f10b171099d67fdf">UDR::describeStatistics()</a> interface). </li>
<li><code>MAX_DEGREE_OF_PARALLELISM:</code> Choose the highest possible degree of parallelism. </li>
<li><code>ONE_INSTANCE_PER_NODE:</code> Start one parallel instance on every Trafodion node. This is mostly meant for internal TMUDFs, e.g. a TMUDF to read the log files on every node.</li>
</ul>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classtmudr_1_1UDRPlanInfo.html#ac856607de40f3bd6813adbd6a0da7ee4">getDesiredDegreeOfParallelism()</a> </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>dop</em>&nbsp;</td><td>desired degree of parallelism (a positive number or one of the enum values in <a class="el" href="classtmudr_1_1UDRPlanInfo.html#ac65dd2b236e8f48c00c9b69efed78d19" title="Special degrees of parallelism.">UDRPlanInfo::SpecialDegreeOfParallelism</a>). </td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classtmudr_1_1UDRException.html" title="This is the exception to throw when an error occurs in a UDR.">UDRException</a></em>&nbsp;</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a9699b7abd3e69cb9ea15bc999f424cc0"></a><!-- doxytag: member="tmudr::UDRPlanInfo::setUDRWriterCompileTimeData" ref="a9699b7abd3e69cb9ea15bc999f424cc0" args="(UDRWriterCompileTimeData *compileTimeData)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void UDRPlanInfo::setUDRWriterCompileTimeData </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classtmudr_1_1UDRWriterCompileTimeData.html">UDRWriterCompileTimeData</a> *&nbsp;</td>
<td class="paramname"> <em>compileTimeData</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set data to persist between calls of the optimizer interface</p>
<p>This call can be used to attach an object derived from class <a class="el" href="classtmudr_1_1UDRWriterCompileTimeData.html" title="Compile time data owned by the UDR writer.">UDRWriterCompileTimeData</a> to the <a class="el" href="classtmudr_1_1UDRPlanInfo.html" title="Describes the query plan used for a UDR invocation.">UDRPlanInfo</a> object. Once attached, the data will be carried between the stages of the optimizer interface and can be used to keep state. Note that this data will be deleted at the end of the optimizer phase and will not persist until runtime.</p>
<p>Use this method to keep data that is specific to a query plan alternative, represented by the <a class="el" href="classtmudr_1_1UDRPlanInfo.html" title="Describes the query plan used for a UDR invocation.">UDRPlanInfo</a> object. Use <a class="el" href="classtmudr_1_1UDRInvocationInfo.html#a62d8e083376c816dc66d1d7447869bee">UDRInvocationInfo::setUDRWriterCompileTimeData()</a> to keep data that is common for the entire <a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> invocation.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classtmudr_1_1UDRInvocationInfo.html#a62d8e083376c816dc66d1d7447869bee">UDRInvocationInfo::setUDRWriterCompileTimeData()</a> </dd>
<dd>
<a class="el" href="classtmudr_1_1UDRPlanInfo.html#a73487ea5456ec8a53d52a66813589976">getUDRWriterCompileTimeData()</a> </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>compileTimeData</em>&nbsp;</td><td><a class="el" href="classtmudr_1_1UDR.html" title="This class represents the code associated with a UDR.">UDR</a> writer-defined compile-time data to attach. </td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classtmudr_1_1UDRException.html" title="This is the exception to throw when an error occurs in a UDR.">UDRException</a></em>&nbsp;</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="sqludr_8h_source.html">sqludr.h</a></li>
<li>sqludr.cpp</li>
</ul>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Enumerator</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on 2 May 2020 for tmudr by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>