[teiid-commits] teiid SVN: r2458 - in trunk/documentation/client-developers-guide/src/main/docbook/en-US: content and 1 other directory.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Thu Aug 12 13:32:44 EDT 2010


Author: shawkins
Date: 2010-08-12 13:32:44 -0400 (Thu, 12 Aug 2010)
New Revision: 2458

Added:
   trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/prepared-statements.xml
Modified:
   trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml
   trunk/documentation/client-developers-guide/src/main/docbook/en-US/main.xml
Log:
adding a note about teiid prepared statements

Modified: trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml
===================================================================
--- trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml	2010-08-12 17:18:16 UTC (rev 2457)
+++ trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml	2010-08-12 17:32:44 UTC (rev 2458)
@@ -23,9 +23,9 @@
         <listitem> <para>Start the Teiid Server (JBoss AS), if it is not already running.</para> </listitem>
     </orderedlist>
     
-    <para>Now that you have the VDB deployed in Teiid Server, client applications 
-    can connect to Teiid Server and issue SQL queries against deployed VDB using Teiid's JDBC API. If you are new to JDBC, learn about 
-    <ulink url="http://java.sun.com/docs/books/tutorial/jdbc/index.html">JDBC</ulink> here. Teiid ships with
+    <para>Now that you have the VDB deployed in the Teiid Server, client applications 
+    can connect to the Teiid Server and issue SQL queries against deployed VDB using Teiid's JDBC API. If you are new to JDBC, see Java's documentation about 
+    <ulink url="http://java.sun.com/docs/books/tutorial/jdbc/index.html">JDBC</ulink>. Teiid ships with
     <code>teiid-&versionNumber;-client.jar</code> in the <code>"jboss-install/server/&lt;profile&gt;/lib"</code> directory. 
     
     <itemizedlist>
@@ -37,8 +37,7 @@
     </itemizedlist>
     </para>
     
-    <para>Once you have established a connection with the Teiid Server, you can use standard JDBC API classes, like 
-        DatabaseMetadata and ResultSetMetadata, to interrogate metadata and Statement classes to execute queries.</para>
+    <para>Once you have established a connection with the Teiid Server, you can use standard JDBC API classes to interrogate metadata and execute queries.</para>
     
     <section id="driver_connection">
 		<title>Driver Connection</title>

Added: trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/prepared-statements.xml
===================================================================
--- trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/prepared-statements.xml	                        (rev 0)
+++ trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/prepared-statements.xml	2010-08-12 17:32:44 UTC (rev 2458)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % CustomDTD SYSTEM "../../../../../../docbook/custom.dtd">
+%CustomDTD;
+]>
+<chapter id="prepared-statements">
+    <title>Prepared Statements</title>
+    
+    <para>Teiid provides a standard implementation of <code>java.sql.PreparedStatement</code>.  PreparedStatements can be very important in speeding up common statement execution, since they allow the server to skip parsing, resolving, and planning of the statement.
+    See the Java documentation for more information on <ulink url="http://download.oracle.com/javase/6/docs/technotes/guides/jdbc/getstart/preparedstatement.html#1000039">PreparedStatement usage</ulink>.
+    </para>
+    
+    <itemizedlist>
+    	<para><code>PreparedStatement</code> Considerations</para>
+    	<listitem>
+		    <para>It is not necessary to pool client side Teiid <code>PreparedStatements</code>, since Teiid performs plan caching on the server side.</para>	
+    	</listitem>
+    	<listitem>
+    		<para>The number of cached plans is configurable (see the Admin Guide), and are purged by the least recently used (LRU).</para>
+    	</listitem>
+    	<listitem>
+    		<para>Cached plans are not distributed through a cluster.  A new plan must be created for each cluster member.</para>
+    	</listitem>
+    	<listitem>
+    		<para>Plans are cached for the entire VDB or for just a particular session.  The scope of a plan is detected automatically based upon the functions evaluated during it's planning process.</para>
+    	</listitem>
+    	<listitem>
+    		<para>Runtime updates of costing information do not yet cause replanning.  At this time only session scoped temporary table or internally materialized tables update their costing information.</para>
+    	</listitem>
+    	<listitem>
+    		<para>Stored procedures executed through a <code>CallableStatement</code> have their plans cached just as a <code>PreparedStatement</code>.</para>
+    	</listitem>
+    	<listitem>
+    		<para>Bind variable types in function signatures, e.g. "where t.col = abs(?)" can be determined if the function has only one signature or if the function is used in a predicate where the return type can be determined.  
+    		In more complex situations it may be necessary to add a type hint with a cast or convert, e.g. upper(convert(?, string)).</para>
+    	</listitem>
+    </itemizedlist>
+    
+</chapter>
\ No newline at end of file


Property changes on: trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/prepared-statements.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/documentation/client-developers-guide/src/main/docbook/en-US/main.xml
===================================================================
--- trunk/documentation/client-developers-guide/src/main/docbook/en-US/main.xml	2010-08-12 17:18:16 UTC (rev 2457)
+++ trunk/documentation/client-developers-guide/src/main/docbook/en-US/main.xml	2010-08-12 17:32:44 UTC (rev 2458)
@@ -46,6 +46,7 @@
     <toc/>
         
     <xi:include href="content/jdbc-connection.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+    <xi:include href="content/prepared-statements.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
     <xi:include href="content/jdbc-extensions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
     <xi:include href="content/jdbc-transactions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
     <xi:include href="content/ssl.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />



More information about the teiid-commits mailing list