\documentclass[11pt]{scrartcl}

\usepackage{url,float}

\title{
  \textbf{\large Database Tuning -- Assignment 2}\\
  Query Tuning
}

\author{
 Group Name (e.g. A1, B5, B3)\\
 \large Lastname1 Firstname1, StudentID1 \\
 \large Lastname2 Firstname2, StudentID2 \\
 \large Lastname3 Firstname3, StudentID3 
}

\begin{document}

\maketitle

\subsection*{Experimental Data}

\paragraph{Creating Tables and Indexes}

SQL statements used to create the tables {\tt Employee}, {\tt
  Student}, and {\tt Techdept}, and the indexes on the tables:

{\small
\begin{verbatim}
  SQL QUERIES ...
\end{verbatim}
}

\paragraph{Populating the Tables}

How did you fill the tables? What values did you use? Give a short
description of your program.

\subsection*{Query 1}

\paragraph{Original Query}

{\small
\begin{verbatim}
  SQL ORIGINAL QUERY
\end{verbatim}
}

\paragraph{Rewritten Query}

{\small
\begin{verbatim}
  SQL REWRITTEN QUERY
\end{verbatim}
}

\paragraph{Evaluation of the Execution Plans}

Execution plan original query:

\begin{verbatim}
  execution plan original query...
\end{verbatim}

Give an interpretation of the execution plan, i.e., describe how the
original query is evaluated.

Execution plan rewritten query:

\begin{verbatim}
  execution plan rewritten query...
\end{verbatim}

Give an interpretation of the execution plan, i.e., describe how the
rewritten query is evaluated.

Discuss, how the execution plan changed between the original and the
rewritten query. In both the interpretation of the query plans and the
discussion focus on the crucial parts, i.e., the parts of the query
plans that cause major runtime differences.

\paragraph{Runtime} Discuss, why the rewritten query is (or is not)
faster than the original query.


\begin{table}[H]
  \begin{tabular}{l|r}
    & Runtime [sec] \\
   \hline
    Original query & \\
    Rewritten query & \\
  \end{tabular}
\end{table}

\subsection*{Query 2}

\paragraph{Original Query}

{\small
\begin{verbatim}
  SQL ORIGINAL QUERY
\end{verbatim}
}

\paragraph{Rewritten Query}

{\small
\begin{verbatim}
  SQL REWRITTEN QUERY
\end{verbatim}
}

\paragraph{Evaluation of the Execution Plans}

Execution plan original query:

\begin{verbatim}
  execution plan original query...
\end{verbatim}

Give an interpretation of the execution plan, i.e., describe how the
original query is evaluated.

Execution plan rewritten query:

\begin{verbatim}
  execution plan rewritten query...
\end{verbatim}

Give an interpretation of the execution plan, i.e., describe how the
rewritten query is evaluated.

Discuss, how the execution plan changed between the original and the
rewritten query. In both the interpretation of the query plans and the
discussion focus on the crucial parts, i.e., the parts of the query
plans that cause major runtime differences.

\paragraph{Runtime} Discuss, why the rewritten query is (or is not)
faster than the original query.


\begin{table}[H]
  \begin{tabular}{l|r}
    & Runtime [sec] \\
   \hline
    Original query & \\
    Rewritten query & \\
  \end{tabular}
\end{table}


  Time in hours: {\bf XXX}

\end{document}
