<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft Internet Assistant for PowerPoint 97">
<TITLE>Prepare for speed</TITLE>
</HEAD>
<BODY >
<H1>Prepare for speed</H1>
<P><UL>
<LI><H2>prepare() - what happens in the server...
</H2>
<UL>
<LI>Receive and parse the SQL statement into internal form
<LI>Get details for all the selected tables
<LI>Check access rights for each
<LI>Get details for all the selected fields
<LI>Check data types in expressions
<LI>Get details for the indices on all the fields in where/join clauses
<LI>Develop an optimised query 'access plan' for best execution
<LI>Return a handle for all this cached information
</UL><LI>This can be an expensive process
<UL>
<LI>especially the 'access planÂ’ for a complex multi-table query
</UL><LI>Some databases, like MySQL, don't cache the information
<UL>
<LI>but have simpler and faster, but less powerful, plan creation
</UL>.</UL></P>
<P></P>
<P>
<TABLE>
<TD HEIGHT=100 WIDTH=100> <A HREF="tsld008.htm">Previous slide</A> </TD>
<TD HEIGHT=100 WIDTH=100> <A HREF="tsld010.htm">Next slide</A> </TD>
<TD HEIGHT=100 WIDTH=150> <A HREF="tsld001.htm">Back to first slide</A> </TD>
<TD HEIGHT=100 WIDTH=150> <A HREF="sld009.htm">View graphic version</A> </TD>
</TABLE>
<BR>
</P>
</Body>
</HTML>