<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>老刘的博客 &#187; database</title>
	<atom:link href="http://www.laoliu.org/blog/archives/category/database/feed" rel="self" type="application/rss+xml" />
	<link>http://www.laoliu.org/blog</link>
	<description>IT民工Blog</description>
	<lastBuildDate>Sun, 28 Jun 2009 19:22:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>DB2 alter table script</title>
		<link>http://www.laoliu.org/blog/archives/149</link>
		<comments>http://www.laoliu.org/blog/archives/149#comments</comments>
		<pubDate>Wed, 03 Dec 2008 02:54:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://www.laoliu.org/blog/?p=149</guid>
		<description><![CDATA[ALTER TABLE SCHEMA_NAME.TABLE_NAME
  DATA CAPTURE NONE
  LOCKSIZE ROW
  APPEND OFF
  NOT VOLATILE;

1,You can use the DATA CAPTURE CHANGES option on the ALTER TABLE statement to have data changes to that table written to the log in an expanded format. You can then retrieve the log by using a program such as the log apply feature of [...]]]></description>
			<content:encoded><![CDATA[<p>ALTER TABLE SCHEMA_NAME.TABLE_NAME<br />
  DATA CAPTURE NONE<br />
  LOCKSIZE ROW<br />
  APPEND OFF<br />
  NOT VOLATILE;</p>
<p><span id="more-149"></span></p>
<p>1,You can use the DATA CAPTURE CHANGES option on the ALTER TABLE statement to have data changes to that table written to the log in an expanded format. You can then retrieve the log by using a program such as the log apply feature of the Remote Recovery Data Facility (RRDF) program offering, or DB2 DataPropagator.</p>
<p>LOB values are not available for DATA CAPTURE CHANGES. To return a table back to normal logging, use DATA CAPTURE NONE.</p>
<p>2,</p>
<p>VOLATILE CARDINALITY or NOT VOLATILE CARDINALITY<br />
Indicates to the optimizer whether or not the cardinality of table table-name can<br />
vary significantly at run time. Volatility applies to the number of rows in the<br />
table, not to the table itself. CARDINALITY is an optional keyword. The default<br />
is NOT VOLATILE.</p>
<p>VOLATILE<br />
Specifies that the cardinality of table table-name can vary significantly at<br />
run time, from empty to large. To access the table, the optimizer will use<br />
an index scan (rather than a table scan, regardless of the statistics) if that<br />
index is index-only (all referenced columns are in the index), or that index<br />
is able to apply a predicate in the index scan. The list prefetch access method<br />
will not be used to access the table. If the table is a typed table, this option<br />
is only supported on the root table of the typed table hierarchy (SQLSTATE 428DR).</p>
<p>NOT VOLATILE<br />
Specifies that the cardinality of table-name is not volatile.<br />
Access plans to this table will continue to be based on existing statistics and<br />
on the current optimization level.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laoliu.org/blog/archives/149/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>db2中快速清空表</title>
		<link>http://www.laoliu.org/blog/archives/121</link>
		<comments>http://www.laoliu.org/blog/archives/121#comments</comments>
		<pubDate>Thu, 20 Mar 2008 06:00:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://www.laoliu.org/blog/archives/121</guid>
		<description><![CDATA[删数据很烦人还慢，如果想全部清空又不想重建表，用这个吧
ALTER TABLE SCHEMA.TABLE_NAME ACTIVATE NOT LOGGED INITIALLY WITH EMPTY TABLE;
]]></description>
			<content:encoded><![CDATA[<p>删数据很烦人还慢，如果想全部清空又不想重建表，用这个吧<br />
ALTER TABLE <em><strong>SCHEMA.TABLE_NAME</strong></em> ACTIVATE NOT LOGGED INITIALLY WITH EMPTY TABLE;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laoliu.org/blog/archives/121/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
