<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.ibm-db2.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'function.db2-statistics.php',
    1 => 'db2_statistics',
    2 => 'Returns a result set listing the index and statistics for a table',
  ),
  'up' => 
  array (
    0 => 'ref.ibm-db2.php',
    1 => 'IBM DB2 İşlevleri',
  ),
  'prev' => 
  array (
    0 => 'function.db2-special-columns.php',
    1 => 'db2_special_columns',
  ),
  'next' => 
  array (
    0 => 'function.db2-stmt-error.php',
    1 => 'db2_stmt_error',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/ibm_db2/functions/db2-statistics.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.db2-statistics" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">db2_statistics</h1>
  <p class="verinfo">(PECL ibm_db2 &gt;= 1.0.0)</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" id="refsect1-function.db2-statistics-description">
  <h3 class="title">Açıklama</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>db2_statistics</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$connection</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$qualifier</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$schema</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$table_name</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$unique</code></span><br>): <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span></div>


  <p class="simpara">
   Returns a result set listing the index and statistics for a table.
  </p>

 </div>

 <div class="refsect1 parameters" id="refsect1-function.db2-statistics-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <dl>
   
    <dt><code class="parameter">connection</code></dt>
    <dd>
     <span class="simpara">
      A valid connection to an IBM DB2, Cloudscape, or Apache Derby database.
     </span>
    </dd>
    
   
    <dt><code class="parameter">qualifier</code></dt>
    <dd>
     <span class="simpara">
      A qualifier for DB2 databases running on OS/390 or z/OS servers. For
      other databases, pass <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> or an empty string.
     </span>
    </dd>
    
   
    <dt><code class="parameter">schema</code></dt>
    <dd>
     <span class="simpara">
      The schema that contains the targeted table. If this parameter is
      <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>, the statistics and indexes are returned for the schema of the
      current user.
     </span>
    </dd>
    
   
    <dt><code class="parameter">table_name</code></dt>
    <dd>
     <span class="simpara">
      The name of the table.
     </span>
    </dd>
    
   
    <dt><code class="parameter">unique</code></dt>
    <dd>
     <span class="simpara">
      When <code class="parameter">unique</code> is <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, the information for all
      indexes in the table are returned.
      Otherwise, only the information for unique indexes in the table are
      returned.
     </span>
    </dd>
    
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.db2-statistics-returnvalues">
  <h3 class="title">Dönen Değerler</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="doctable informaltable">
    
     <thead>
      <tr>
       <th>Column name</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>TABLE_CAT</td>
       <td>The catalog that contains the table. The value is <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> if
       this table does not have catalogs.</td>
      </tr>

      <tr>
       <td>TABLE_SCHEM</td>
       <td>Name of the schema that contains the table.</td>
      </tr>

      <tr>
       <td>TABLE_NAME</td>
       <td>Name of the table.</td>
      </tr>

      <tr>
       <td>NON_UNIQUE</td>
       <td>
        <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="doctable informaltable">
          
           <thead>
            <tr>
             <th>Return value</th>
             <th>Parameter type</th>
            </tr>

           </thead>

           <tbody class="tbody">
            <tr>
             <td>0 (SQL_FALSE)</td>
             <td>The index allows duplicate values.</td>
            </tr>

            <tr>
             <td>1 (SQL_TRUE)</td>
             <td>The index values must be unique.</td>
            </tr>

            <tr>
             <td><strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></td>
             <td>This row is statistics information for the table itself.</td>
            </tr>

           </tbody>
          
         </table>

        </p>
       </td>
      </tr>

      <tr>
       <td>INDEX_QUALIFIER</td>
       <td>A string value representing the qualifier that would have to be
       prepended to INDEX_NAME to fully qualify the index.</td>
      </tr>

      <tr>
       <td>INDEX_NAME</td>
       <td>A string representing the name of the index.</td>
      </tr>

      <tr>
       <td>TYPE</td>
       <td>
        <p class="para">
         An integer value representing the type of information contained in
         this row of the result set:
         <table class="doctable informaltable">
          
           <thead>
            <tr>
             <th>Return value</th>
             <th>Parameter type</th>
            </tr>

           </thead>

           <tbody class="tbody">
            <tr>
             <td>0 (SQL_TABLE_STAT)</td>
             <td>The row contains statistics about the table itself.</td>
            </tr>

            <tr>
             <td>1 (SQL_INDEX_CLUSTERED)</td>
             <td>The row contains information about a clustered index.</td>
            </tr>

            <tr>
             <td>2 (SQL_INDEX_HASH)</td>
             <td>The row contains information about a hashed index.</td>
            </tr>

            <tr>
             <td>3 (SQL_INDEX_OTHER)</td>
             <td>The row contains information about a type of index that
             is neither clustered nor hashed.</td>
            </tr>

           </tbody>
          
         </table>

        </p>
       </td>
      </tr>

      <tr>
       <td>ORDINAL_POSITION</td>
       <td>The 1-indexed position of the column in the index. <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> if
        the row contains statistics information about the table itself.</td>
      </tr>

      <tr>
       <td>COLUMN_NAME</td>
       <td>The name of the column in the index. <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> if the row
        contains statistics information about the table itself.</td>
      </tr>

      <tr>
       <td>ASC_OR_DESC</td>
       <td>
        <code class="literal">A</code> if the column is sorted in ascending order,
        <code class="literal">D</code> if the column is sorted in descending order,
        <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> if the row contains statistics information about the table
        itself.
       </td>
      </tr>

      <tr>
       <td>CARDINALITY</td>
       <td>
        <span class="simpara">
         If the row contains information about an index, this column contains
         an integer value representing the number of unique values in the
         index.
        </span>
        <span class="simpara">
         If the row contains information about the table itself, this column
         contains an integer value representing the number of rows in the
         table.
        </span>
       </td>
      </tr>

      <tr>
       <td>PAGES</td>
       <td>
        <span class="simpara">
         If the row contains information about an index, this column contains
         an integer value representing the number of pages used to store the
         index.
        </span>
        <span class="simpara">
         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.
        </span>
       </td>
      </tr>

      <tr>
       <td>FILTER_CONDITION</td>
       <td>Always returns <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.</td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 

 <div class="refsect1 seealso" id="refsect1-function.db2-statistics-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.db2-column-privileges.php" class="function" rel="rdfs-seeAlso">db2_column_privileges()</a> - Returns a result set listing the columns and associated privileges for a table</span></li>
   <li><span class="function"><a href="function.db2-columns.php" class="function" rel="rdfs-seeAlso">db2_columns()</a> - Returns a result set listing the columns and associated metadata for a table</span></li>
   <li><span class="function"><a href="function.db2-foreign-keys.php" class="function" rel="rdfs-seeAlso">db2_foreign_keys()</a> - Returns a result set listing the foreign keys for a table</span></li>
   <li><span class="function"><a href="function.db2-primary-keys.php" class="function" rel="rdfs-seeAlso">db2_primary_keys()</a> - Returns a result set listing primary keys for a table</span></li>
   <li><span class="function"><a href="function.db2-procedure-columns.php" class="function" rel="rdfs-seeAlso">db2_procedure_columns()</a> - Returns a result set listing stored procedure parameters</span></li>
   <li><span class="function"><a href="function.db2-procedures.php" class="function" rel="rdfs-seeAlso">db2_procedures()</a> - Returns a result set listing the stored procedures registered in a database</span></li>
   <li><span class="function"><a href="function.db2-special-columns.php" class="function" rel="rdfs-seeAlso">db2_special_columns()</a> - Returns a result set listing the unique row identifier columns for a table</span></li>
   <li><span class="function"><a href="function.db2-table-privileges.php" class="function" rel="rdfs-seeAlso">db2_table_privileges()</a> - Returns a result set listing the tables and associated privileges in a database</span></li>
   <li><span class="function"><a href="function.db2-tables.php" class="function" rel="rdfs-seeAlso">db2_tables()</a> - Returns a result set listing the tables and associated metadata in a database</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>