<!-- Presentation generated by Internet Assistant for Microsoft PowerPoint 97 -->
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft Internet Assistant for Microsoft PowerPoint 97">
<TITLE>Respect your server's SQL cache</TITLE>
</HEAD>
<BODY >
<CENTER>
<TABLE WIDTH=100%>
<TR> <TD WIDTH=100% ALIGN=CENTER>
<A HREF="sld001.htm">First</A>
<A HREF="sld015.htm">Previous</A>
<A HREF="sld017.htm">Next</A>
<A HREF="sld096.htm">Last</A>
<A HREF="index.htm">Index</A>
<A HREF="dbi.perl.org">Home</A>
<A HREF="tsld016.htm">Text</A>
</TD> </TR>
<TR> <TD WIDTH=100% ALIGN=CENTER>
<IMG SRC="img016.gif" usemap="#Objmap" WIDTH=800 HEIGHT=600 BORDER=0>
</TD> </TR>
</TABLE>
<P>Slide 16 of 96</P>
</CENTER>
<!-- <UL>
<H2>Respect your server's SQL cache</H2>
</UL></P>
<P><UL>
<LI><H2>Optimised Access Plan etc. is cached within the server
</H2>
<UL>
<LI>keyed by the exact original SQL string used
<LI>
</UL></UL><UL>
<LI><H2>Compare do("insert
$id");
</H2>
<UL>
with do("insert
?", undef, $id);
<BR><UL>
<LI>
</UL></UL></UL><UL>
<LI><H2>Without placeholders, SQL string varies each time
</H2>
<UL>
<LI>so cached one is not reused
<LI>so time is wasted creating a new access plan
<LI>the new statement and access plan are added to cache
<LI>so the cache fills and other statements get pushed out
<LI>on a busy system this can lead to thrashing
<LI>
</UL></UL><UL>
<LI><H2>Oracle now has a way to avoid/reduce this problem
</H2>
<UL>
<LI>it can effectively replace literal constants with placeholders
<LI>but the quality of query execution plans can suffer
</UL></UL><UL>
<H2>.</H2>
</UL></P>
<P> -->
</Body>
</HTML>