15/82
\begin{frame}
  \frametitle{JDBC: Optimising Applications}
  
  For improving the performance of JDBC applications:
  \begin{itemize}
    \pause\smallskip
    \item \emph{Connection pooling}: 
      \begin{itemize}
        \item keep DB connection open, reduces latency
      \end{itemize}
    \pause\smallskip
    \item \emph{Prepared statements}:
      \begin{itemize}
        \item SQL calls that are repeated often
        \item allows driver to optimise queries
        \item created with \emph{Connection.prepareStatement()}
      \end{itemize}
    \pause\smallskip
    \item \emph{Stored procedures} to reduce \#query roundtrips
      \begin{itemize}
        \item written in DB-specific language, not portable \error
        \item accessed with \emph{Connection.prepareCall()}
      \end{itemize}
    \pause\smallskip
    \item Use a \emph{driver} that is \emph{bulk}-transfer optimised
      \begin{itemize}
        \item when retrieving large result sets
        \item driver can send several tuples in a single network packet
      \end{itemize}
  \end{itemize}
\end{frame}