function.db2-statistics.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 379 行

HTML
379
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Returns a result set listing the index and statistics for a table</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.db2-special-columns.html">db2_special_columns</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.db2-stmt-error.html">db2_stmt_error</a></div> <div class="up"><a href="ref.ibm-db2.html">IBM DB2 Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.db2-statistics" class="refentry"> <div class="refnamediv">  <h1 class="refname">db2_statistics</h1>  <p class="verinfo">(PECL ibm_db2:1.0-1.6.2)</p><p class="refpurpose"><span class="refname">db2_statistics</span> &mdash; <span class="dc-title">   Returns a result set listing the index and statistics for a table  </span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">resource</span> <span class="methodname"><b><b>db2_statistics</b></b></span>    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$connection</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$qualifier</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$schema</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$table-name</tt></span>   , <span class="methodparam"><span class="type">bool</span> <tt class="parameter">$unique</tt></span>   )</div>  <p class="para rdfs-comment">   Returns a result set listing the index and statistics for a table.  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">connection</tt></i></span>     <dd>      <p class="para">       A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.      </p>     </dd>     </dt>    <dt>     <span class="term"><i><tt class="parameter">qualifier</tt></i></span>     <dd>      <p class="para">       A qualifier for DB2 databases running on OS/390 or z/OS servers. For       other databases, pass <b><tt>NULL</tt></b> or an empty string.      </p>     </dd>     </dt>    <dt>     <span class="term"><i><tt class="parameter">schema</tt></i></span>     <dd>      <p class="para">       The schema that contains the targeted table. If this parameter is       <b><tt>NULL</tt></b>, the statistics and indexes are returned for the schema of the       current user.      </p>     </dd>     </dt>    <dt>     <span class="term"><i><tt class="parameter">table_name</tt></i></span>     <dd>      <p class="para">       The name of the table.      </p>     </dd>     </dt>    <dt>     <span class="term"><i><tt class="parameter">unique</tt></i></span>     <dd>      <p class="para">       An integer value representing the type of index information to return.       <dl>        <dt>         <br /><span class="term"><i><tt class="parameter">0</tt></i></span>         <dd>          <p class="para">           Return only the information for unique indexes on the table.          </p>         </dd>        </dt>        <dt>         <span class="term"><i><tt class="parameter">1</tt></i></span>         <dd>          <p class="para">           Return the information for all indexes on the table.          </p>         </dd>        </dt>       </dl>      </p>     </dd>     </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns a statement resource with a result set containing rows describing   the statistics and indexes for the base tables matching the specified   parameters. The rows are composed of the following columns:   <table class="informaltable">    <colgroup>     <thead valign="middle">      <tr valign="middle">       <th colspan="1">Column name</th>       <th colspan="1">Description</th>      </tr>     </thead>     <tbody valign="middle" class="tbody">      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">TABLE_CAT</td>       <td colspan="1" rowspan="1" align="left">The catalog that contains the table. The value is <b><tt>NULL</tt></b> if       this table does not have catalogs.</td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">TABLE_SCHEM</td>       <td colspan="1" rowspan="1" align="left">Name of the schema that contains the table.</td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">TABLE_NAME</td>       <td colspan="1" rowspan="1" align="left">Name of the table.</td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">NON_UNIQUE</td>       <td colspan="1" rowspan="1" align="left">        <p class="para">         An integer value representing whether the index prohibits unique         values, or whether the row represents statistics on the table itself:         <table class="informaltable">          <colgroup>           <thead valign="middle">            <tr valign="middle">             <th colspan="1">Return value</th>             <th colspan="1">Parameter type</th>            </tr>           </thead>           <tbody valign="middle" class="tbody">            <tr valign="middle">             <td colspan="1" rowspan="1" align="left">0 (SQL_FALSE)</td>             <td colspan="1" rowspan="1" align="left">The index allows duplicate values.</td>            </tr>            <tr valign="middle">             <td colspan="1" rowspan="1" align="left">1 (SQL_TRUE)</td>             <td colspan="1" rowspan="1" align="left">The index values must be unique.</td>            </tr>            <tr valign="middle">             <td colspan="1" rowspan="1" align="left"><b><tt>NULL</tt></b></td>             <td colspan="1" rowspan="1" align="left">This row is statistics information for the table itself.</td>            </tr>           </tbody>          </colgroup>         </table>        </p>       </td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">INDEX_QUALIFIER</td>       <td colspan="1" rowspan="1" align="left">A string value representing the qualifier that would have to be       prepended to INDEX_NAME to fully qualify the index.</td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">INDEX_NAME</td>       <td colspan="1" rowspan="1" align="left">A string representing the name of the index.</td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">TYPE</td>       <td colspan="1" rowspan="1" align="left">        <p class="para">         An integer value representing the type of information contained in         this row of the result set:         <table class="informaltable">          <colgroup>           <thead valign="middle">            <tr valign="middle">             <th colspan="1">Return value</th>             <th colspan="1">Parameter type</th>            </tr>           </thead>           <tbody valign="middle" class="tbody">            <tr valign="middle">             <td colspan="1" rowspan="1" align="left">0 (SQL_TABLE_STAT)</td>             <td colspan="1" rowspan="1" align="left">The row contains statistics about the table itself.</td>            </tr>            <tr valign="middle">             <td colspan="1" rowspan="1" align="left">1 (SQL_INDEX_CLUSTERED)</td>             <td colspan="1" rowspan="1" align="left">The row contains information about a clustered index.</td>            </tr>            <tr valign="middle">             <td colspan="1" rowspan="1" align="left">2 (SQL_INDEX_HASH)</td>             <td colspan="1" rowspan="1" align="left">The row contains information about a hashed index.</td>            </tr>            <tr valign="middle">             <td colspan="1" rowspan="1" align="left">3 (SQL_INDEX_OTHER)</td>             <td colspan="1" rowspan="1" align="left">The row contains information about a type of index that             is neither clustered nor hashed.</td>            </tr>           </tbody>          </colgroup>         </table>        </p>       </td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">ORDINAL_POSITION</td>       <td colspan="1" rowspan="1" align="left">The 1-indexed position of the column in the index. <b><tt>NULL</tt></b> if        the row contains statistics information about the table itself.</td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">COLUMN_NAME</td>       <td colspan="1" rowspan="1" align="left">The name of the column in the index. <b><tt>NULL</tt></b> if the row        contains statistics information about the table itself.</td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">ASC_OR_DESC</td>       <td colspan="1" rowspan="1" align="left">        <i>A</i> if the column is sorted in ascending order,        <i>D</i> if the column is sorted in descending order,        <b><tt>NULL</tt></b> if the row contains statistics information about the table        itself.       </td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">CARDINALITY</td>       <td colspan="1" rowspan="1" align="left">        <p class="para">         If the row contains information about an index, this column contains         an integer value representing the number of unique values in the         index.        </p>        <p class="para">         If the row contains information about the table itself, this column         contains an integer value representing the number of rows in the         table.        </p>       </td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">PAGES</td>       <td colspan="1" rowspan="1" align="left">        <p class="para">         If the row contains information about an index, this column contains         an integer value representing the number of pages used to store the         index.        </p>        <p class="para">         If the row contains information about the table itself, this column         contains an integer value representing the number of pages used to         store the table.        </p>       </td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">FILTER_CONDITION</td>       <td colspan="1" rowspan="1" align="left">Always returns <b><tt>NULL</tt></b>.</td>      </tr>     </tbody>    </colgroup>   </table>  </p> </div>  <div class="refsect1 seealso">  <h3 class="title">See Also</h3>  <p class="para">   <ul class="simplelist">    <li class="member"><a href="function.db2-column-privileges.html" class="function" rel="rdfs-seeAlso">db2_column_privileges()</a></li>    <li class="member"><a href="function.db2-columns.html" class="function" rel="rdfs-seeAlso">db2_columns()</a></li>    <li class="member"><a href="function.db2-foreign-keys.html" class="function" rel="rdfs-seeAlso">db2_foreign_keys()</a></li>    <li class="member"><a href="function.db2-primary-keys.html" class="function" rel="rdfs-seeAlso">db2_primary_keys()</a></li>    <li class="member"><a href="function.db2-procedure-columns.html" class="function" rel="rdfs-seeAlso">db2_procedure_columns()</a></li>    <li class="member"><a href="function.db2-procedures.html" class="function" rel="rdfs-seeAlso">db2_procedures()</a></li>    <li class="member"><a href="function.db2-special-columns.html" class="function" rel="rdfs-seeAlso">db2_special_columns()</a></li>    <li class="member"><a href="function.db2-table-privileges.html" class="function" rel="rdfs-seeAlso">db2_table_privileges()</a></li>    <li class="member"><a href="function.db2-tables.html" class="function" rel="rdfs-seeAlso">db2_tables()</a></li>   </ul>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.db2-special-columns.html">db2_special_columns</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.db2-stmt-error.html">db2_stmt_error</a></div> <div class="up"><a href="ref.ibm-db2.html">IBM DB2 Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?