Not logged in.

Contribution Details

Type Bachelor's Thesis
Scope Discipline-based scholarship
Title Optimization of Mixed Queries in MonetDB System
Organization Unit
Authors
  • Alphonse Mariyagnanaseelan
Supervisors
  • Michael Hanspeter Böhlen
  • Oksana Dolmatova
Language
  • English
Institution University of Zurich
Faculty Faculty of Business, Economics and Informatics
Date 2018
Abstract Text The current approach to analyze scientific data stored in a DBMS is to export the data to a statistics software like MATLAB or R, perform the analysis, and then import the data back into the DBMS, in case the result has to be stored or further manipulated using relational operations like selections or joins. Those steps are necessary due to the fact that DBMSs currently only support simple aggregation operations and vector operations with attributes of a relation, but more sophisticated linear algebra operations are not available yet. We implement the matrix addition operation in MonetDB, a column-store DBMS. Further, we extend the query optimizer of MonetDB to optimize mixed queries, that consists of both matrix related operations and relational operations. We focus on the optimization of matrix addition in combination with selections, where we investigate the properties of such an optimization, we define equivalence rules for the rewriting of such mixed queries, and we discuss the trade-off in our optimization. The experimental evaluation shows that our optimization can reduce the query time by up to 95%, however the mentioned trade-off has a measurable and counterproductive effect in some cases. Since the optimization is done by the query optimizer, the user can simply declare the matrix operation, similar to join operations, and perform other relational operations on the result.
Zusammenfassung Die derzeitige Herangehensweise für die Auswertung wissenschaftlicher Daten, die in einer Datenbank gespeichert sind, ist, dass die Daten in eine Statistik Software wie MATLAB oder R exportiert, die Auswertung durchgeführt und dann die Daten wieder zurück in die Datenbank importiert wird, falls die resultierten Daten in der Datenbank gespeichert oder mit relationalen Operationen, wie Selektionen oder Joins, weiter verarbeitet werden sollen. Diese Schritte sind notwendig, da Datenbankmanagementsysteme zurzeit nur einfache Aggregationsoperationen und Vektoroperationen mit Attributen einer Relation ermöglichen, hingegen komplexere Operationen der linearen Algebra noch nicht zur Verfügung stehen. Wir implementieren die Matrix Addition Operation in MonetDB, eine Spaltenorientierte Datenbank. Ferner erweitern wir den Query Optimierer von MonetDB, sodass dieser gemischte Queries, welche aus Matrix Operationen sowie relationalen Operationen bestehen, optimiert. Wir fokussieren uns auf die Optimierung der Matrix Addition Operation in Kombination mit Selektionen, wobei wir die Eigenschaften solcher Optimierungen untersuchen, Equivalenzregeln für die Umformulierung von gemischten Queries definieren und den Trade-off in unserer Optimierung diskutieren. Die experimentelle Evaluierung zeigt, dass unsere Optimierung die Abfragezeit um bis zu 95% verringern kann, jedoch hat der erwähnte Trade-off einen messbaren und kontraproduktiven Effekt in bestimmten Fällen. Da die Optimierung durch den Query Optimierer durchgeführt wird, kann der Benützer, ähnlich wie bei Join Operationen, die Matrix Operation deklarieren und andere relationale Operationen auf dem Resultat ausführen.
PDF File Download
Export BibTeX