<!-- Presentation generated by Internet Assistant for Microsoft PowerPoint 97 -->
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft Internet Assistant for Microsoft PowerPoint 97">
<TITLE>The best laid plans</TITLE>
</HEAD>
<BODY >
<CENTER>
<TABLE WIDTH=100%>
<TR> <TD WIDTH=100% ALIGN=CENTER>
<A HREF="sld001.htm">First</A>
<A HREF="sld009.htm">Previous</A>
<A HREF="sld011.htm">Next</A>
<A HREF="sld102.htm">Last</A>
<A HREF="index.htm">Index</A>
<A HREF="dbi.perl.org">Home</A>
<A HREF="tsld010.htm">Text</A>
</TD> </TR>
<TR> <TD WIDTH=100% ALIGN=CENTER>
<IMG SRC="img010.gif" usemap="#Objmap" WIDTH=800 HEIGHT=600 BORDER=0>
</TD> </TR>
</TABLE>
<P>Slide 10 of 102</P>
</CENTER>
<!-- <UL>
<H2>The best laid plans</H2>
</UL></P>
<P><UL>
<LI><H2>Query optimisation is hard
</H2>
<UL>
<LI>Intelligent high quality cost based query optimisation is really hard!
</UL></UL><UL>
<LI><H2>Know your optimiser
</H2>
<UL>
<LI>Oracle, Informix, Sybase, DB2, SQL Server etc. all slightly different.
</UL></UL><UL>
<LI><H2>Check what it's doing
</H2>
<UL>
<LI>Use tools to see the plans used for your queries - very helpful
</UL></UL><UL>
<LI><H2>Help it along
</H2>
<UL>
<LI>Most 'big name' databases have a mechanism to analyse and store the key distributions of indices to help the optimiser make good plans.
<UL>
<LI>Important for tables with skewed (uneven) key distributions
<LI>Beware: keep it fresh, old key distributions might be worse than none
</UL><LI>Some also allow you to embed 'hints' into the SQL as comments
<UL>
<LI>Beware: take it easy, over hinting hinders dynamic optimisation
</UL></UL></UL><UL>
<H2>.</H2>
</UL></P>
<P> -->
</Body>
</HTML>