db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chaa...@apache.org
Subject svn commit: r1340119 - in /db/derby/docs/trunk/src: ref/refderby.ditamap ref/rrefdropstatsproc.dita ref/rrefupdatestatsproc.dita tuning/ctunstats57373.dita
Date Fri, 18 May 2012 14:54:02 GMT
Author: chaase3
Date: Fri May 18 14:54:01 2012
New Revision: 1340119

URL: http://svn.apache.org/viewvc?rev=1340119&view=rev
Log:
DERBY-5756  Document new SYSCS_DROP_STATISTICS procedure

Added a new Reference Manual topic, modified another, and modified a Tuning Derby topic.

Patch: DERBY-5756-2.diff

Added:
    db/derby/docs/trunk/src/ref/rrefdropstatsproc.dita   (with props)
Modified:
    db/derby/docs/trunk/src/ref/refderby.ditamap
    db/derby/docs/trunk/src/ref/rrefupdatestatsproc.dita
    db/derby/docs/trunk/src/tuning/ctunstats57373.dita

Modified: db/derby/docs/trunk/src/ref/refderby.ditamap
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/refderby.ditamap?rev=1340119&r1=1340118&r2=1340119&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/refderby.ditamap (original)
+++ db/derby/docs/trunk/src/ref/refderby.ditamap Fri May 18 14:54:01 2012
@@ -33,6 +33,33 @@ limitations under the License.
 <reltable>
 <relrow>
 <relcell>
+<topicref href="rrefaltertablecompress.dita" navtitle="SYSCS_UTIL.SYSCS_COMPRESS_TABLE
system procedure"></topicref>
+</relcell>
+<relcell>
+<topicref href="rrefdropstatsproc.dita" navtitle="SYSCS_UTIL.SYSCS_DROP_STATISTICS system
procedure"></topicref>
+<topicref href="rrefupdatestatsproc.dita" navtitle="SYSCS_UTIL.SYSCS_UPDATE_STATISTICS
system procedure"></topicref>
+</relcell>
+</relrow>
+<relrow>
+<relcell>
+<topicref href="rrefdropstatsproc.dita" navtitle="SYSCS_UTIL.SYSCS_DROP_STATISTICS system
procedure"></topicref>
+</relcell>
+<relcell>
+<topicref href="rrefupdatestatsproc.dita" navtitle="SYSCS_UTIL.SYSCS_UPDATE_STATISTICS
system procedure"></topicref>
+<topicref href="rrefaltertablecompress.dita" navtitle="SYSCS_UTIL.SYSCS_COMPRESS_TABLE
system procedure"></topicref>
+</relcell>
+</relrow>
+<relrow>
+<relcell>
+<topicref href="rrefupdatestatsproc.dita" navtitle="SYSCS_UTIL.SYSCS_UPDATE_STATISTICS
system procedure"></topicref>
+</relcell>
+<relcell>
+<topicref href="rrefdropstatsproc.dita" navtitle="SYSCS_UTIL.SYSCS_DROP_STATISTICS system
procedure"></topicref>
+<topicref href="rrefaltertablecompress.dita" navtitle="SYSCS_UTIL.SYSCS_COMPRESS_TABLE
system procedure"></topicref>
+</relcell>
+</relrow>
+<relrow>
+<relcell>
 <topicref href="rrefsyscspeeksequence.dita" navtitle="SYSCS_UTIL.SYSCS_PEEK_AT_SEQUENCE
system function"></topicref>
 </relcell>
 <relcell>
@@ -463,6 +490,8 @@ limitations under the License.
 </topicref>
 <topicref href="rrefnativecreateuserproc.dita" navtitle="SYSCS_UTIL.SYSCS_CREATE_USER
system procedure">
 </topicref>
+<topicref href="rrefdropstatsproc.dita" navtitle="SYSCS_UTIL.SYSCS_DROP_STATISTICS stored
procedure">
+</topicref>
 <topicref href="rrefnativedropuserproc.dita" navtitle="SYSCS_UTIL.SYSCS_DROP_USER system
procedure">
 </topicref>
 <topicref href="rrefemptystmtcache.dita" navtitle="SYSCS_UTIL.SYSCS_EMPTY_STATEMENT_CACHE
stored procedure">

Added: db/derby/docs/trunk/src/ref/rrefdropstatsproc.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefdropstatsproc.dita?rev=1340119&view=auto
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefdropstatsproc.dita (added)
+++ db/derby/docs/trunk/src/ref/rrefdropstatsproc.dita Fri May 18 14:54:01 2012
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at      
+
+http://www.apache.org/licenses/LICENSE-2.0  
+
+Unless required by applicable law or agreed to in writing, software  
+distributed under the License is distributed on an "AS IS" BASIS,  
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
+See the License for the specific language governing permissions and  
+limitations under the License.
+-->
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
+ "../dtd/reference.dtd">
+<reference id="rrefdropstatsproc" xml:lang="en-us">
+<title>SYSCS_UTIL.SYSCS_DROP_STATISTICS system procedure</title>
+<shortdesc>The SYSCS_UTIL.SYSCS_DROP_STATISTICS system procedure drops all
+existing cardinality statistics for the index that you specify or for all of the
+indexes on a table.</shortdesc>
+<prolog><metadata>
+<keywords>
+<indexterm>system procedures<indexterm>SYSCS_UTIL.SYSCS_DROP_STATISTICS</indexterm></indexterm>
+<indexterm>SYSCS_UTIL.SYSCS_DROP_STATISTICS system procedure</indexterm>
+<indexterm>cardinality statistics<indexterm>SYSCS_UTIL.SYSCS_DROP_STATISTICS
+system procedure</indexterm></indexterm>
+<indexterm>statistics<indexterm>SYSCS_UTIL.SYSCS_DROP_STATISTICS
+system procedure</indexterm></indexterm>
+</keywords>
+</metadata></prolog>
+<refbody>
+<section><p> You may want to drop the statistics if you are no longer
+using them or if they become incorrect for some reason. You can call the
+<xref href="rrefupdatestatsproc.dita#rrefupdatestatsproc">SYSCS_UTIL.SYSCS_UPDATE_STATISTICS</xref>
+or
+<xref href="rrefaltertablecompress.dita#rrefaltertablecompress">SYSCS_UTIL.SYSCS_COMPRESS_TABLE</xref>
+system procedure to recreate them, or you can wait for automatic statistics
+generation to begin again.</p>
+<p>For more information on cardinality statistics,
+see "Working with cardinality statistics" in the <ph
+conref="../conrefs.dita#pub/cittuning"></ph> guide.</p></section>
+<section><title>Syntax</title>
+<codeblock>SYSCS_UTIL.SYSCS_DROP_STATISTICS(IN SCHEMANAME VARCHAR(128), 
+                                 IN TABLENAME VARCHAR(128), 
+                                 IN INDEXNAME VARCHAR(128))</codeblock>
+<p><note>You can specify <userinput>null</userinput> for the INDEXNAME
to drop
+all existing statistics.</note></p></section>
+<section><title>Execute privileges</title>
+<p>If authentication and SQL authorization are both enabled, all users have
+execute privileges on this procedure. However, in order for the procedure to run
+successfully on a given table, the user must be the owner of either the
+<xref href="rrefattrib26867.dita#rrefattrib26867">database</xref> or the
+schema in which the table resides. See "Enabling user authentication" and
+"Setting the SQL standard authorization mode" in the
+<ph conref="../conrefs.dita#pub/citdevelop"></ph> for more information.</p>
+</section>
+<section><title>Examples</title><p>In the following example, the
system
+procedure drops statistics for the index PAY_DESC on the SAMP.EMPLOYEE
+table:</p>
+<codeblock>CALL SYSCS_UTIL.SYSCS_DROP_STATISTICS('SAMP','EMPLOYEE','PAY_DESC');</codeblock>
+<p>In the following example, <userinput>null</userinput> is
+specified instead of an index name. For all of the indexes on the EMPLOYEE table
+in the SAMP schema, the existing statistics are dropped.</p>
+<codeblock>CALL SYSCS_UTIL.SYSCS_DROP_STATISTICS('SAMP', 'EMPLOYEE', null);</codeblock>
+</section>
+</refbody>
+</reference>

Propchange: db/derby/docs/trunk/src/ref/rrefdropstatsproc.dita
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/docs/trunk/src/ref/rrefupdatestatsproc.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefupdatestatsproc.dita?rev=1340119&r1=1340118&r2=1340119&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefupdatestatsproc.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefupdatestatsproc.dita Fri May 18 14:54:01 2012
@@ -19,25 +19,37 @@ limitations under the License.
  "../dtd/reference.dtd">
 <reference id="rrefupdatestatsproc" xml:lang="en-us">
 <title>SYSCS_UTIL.SYSCS_UPDATE_STATISTICS system procedure</title>
+<shortdesc>The SYSCS_UTIL.SYSCS_UPDATE_STATISTICS system procedure updates the
+cardinality statistics, or creates the statistics if they do not exist, for the
+index that you specify or for all of the indexes on a table.</shortdesc>
+<prolog><metadata>
+<keywords>
+<indexterm>system procedures<indexterm>SYSCS_UTIL.SYSCS_UPDATE_STATISTICS</indexterm></indexterm>
+<indexterm>SYSCS_UTIL.SYSCS_UPDATE_STATISTICS system procedure</indexterm>
+<indexterm>cardinality statistics<indexterm>SYSCS_UTIL.SYSCS_UPDATE_STATISTICS
+system procedure</indexterm></indexterm>
+<indexterm>statistics<indexterm>SYSCS_UTIL.SYSCS_UPDATE_STATISTICS
+system procedure</indexterm></indexterm>
+</keywords>
+</metadata></prolog>
 <refbody>
-<section><p>The SYSCS_UTIL.SYSCS_UPDATE_STATISTICS system procedure
-updates the cardinality statistics, or creates the statistics if they
-do not exist, for the index that you specify or for all of the indexes
-on a table. <ph conref="../conrefs.dita#prod/productshortname"></ph> uses cardinality
statistics to determine
+<section><p><ph conref="../conrefs.dita#prod/productshortname"></ph>
uses cardinality statistics to determine
 the optimal query plan during the compilation of a query. If the statistics
 are missing, <ph conref="../conrefs.dita#prod/productshortname"></ph> might use
a query plan which is not the
 most efficient plan. </p>
-<p>Once statistics have been created, they cannot be dropped and should be
+<p>Once statistics have been created, they should be
 maintained. It is a good idea to call the SYSCS_UTIL.SYSCS_UPDATE_STATISTICS
 procedure when the number of distinct values in an index is likely to have
-changed significantly.</p>
+changed significantly. To drop all existing statistics and start again from
+scratch, call the
+<xref href="rrefdropstatsproc.dita#rrefdropstatsproc"></xref>.</p>
 <p>For more information on cardinality statistics,
 see "Working with cardinality statistics" in the <ph
 conref="../conrefs.dita#pub/cittuning"></ph> guide.</p></section>
 <section><title>Syntax</title>
 <codeblock>SYSCS_UTIL.SYSCS_UPDATE_STATISTICS(IN SCHEMANAME VARCHAR(128), 
                                    IN TABLENAME VARCHAR(128), 
-                                   IN INDEXNAME VARCHAR(128)))</codeblock>
+                                   IN INDEXNAME VARCHAR(128))</codeblock>
 <note>You
 can specify <userinput>null</userinput> for the INDEXNAME to update
 any existing statistics and create statistics for those statistics

Modified: db/derby/docs/trunk/src/tuning/ctunstats57373.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/tuning/ctunstats57373.dita?rev=1340119&r1=1340118&r2=1340119&view=diff
==============================================================================
--- db/derby/docs/trunk/src/tuning/ctunstats57373.dita (original)
+++ db/derby/docs/trunk/src/tuning/ctunstats57373.dita Fri May 18 14:54:01 2012
@@ -59,5 +59,9 @@ logging information by setting the prope
 trace output should appear.</p>
 <p>See the <ph conref="../conrefs.dita#pub/citref"></ph> for details about
these
 properties.</p>
+<p>To remove all statistics in case of problems, call the
+SYSCS_UTIL.SYSCS_DROP_STATISTICS system procedure. See the
+<ph conref="../conrefs.dita#pub/citref"></ph> for details about this procedure
+and about SYSCS_UTIL.SYSCS_COMPRESS_TABLE.</p>
 </conbody>
 </concept>



Mime
View raw message