360 research outputs found

    Analytical querying with typed linear algebra: integration with MonetDB

    Get PDF
    Dissertação de mestrado integrado em Informatics EngineeringCurrent digital transformations in society heavily rely on safe, easy-to-use, high-performance data storage and analysis for smart decision taking. This triggered the need for efficient analytical querying solutions and the columnar database model is increasingly regarded as the most efficient model for data organization in large data banks. MonetDB is a pioneer in the column-wise database model and is currently at the forefront of high performance DBMS engine. A Linear Algebra Querying (LAQ) engine, using a columnar database paradigm and strongly inspired on Typed Linear Algebra (TLA), was developed in a former MSc. dissertation, with a prototype Web interface. Performance benchmarking of this engine showed it outperformed conventional referenced DBMS but it failed to beat MonetDB’s performance. This dissertation aims to improve the performance of the LAQ engine by following a different path: instead of a standalone engine, the new approach implements the engine on top of MonetDB extended with RMA (Relational Matrix Algebra) and inspired by the TLA approach. This enables the use of LAQ scripting to replace the main stream relational algebra query language approach given by SQL. Matrix operations commonly used in LAQ/TLA, such as matrix-matrix multiplication, Khatri-Rao product or Hadamard-Schur product, had to be implemented in RMA to shift from the relational algebra paradigm to TLA. A thorough analysis of the MonetDB/RMA showed the need to implement key TLA operators that are not available at the frontend. Such operators were implemented and successfully tested and validated, paving the way to future benchmarking its performance with TPC-H/OLAP queries and consequent fine tuning of the engine.Atualmente, as transformações digitais na sociedade confiam fortemente no armazenamento e na análise de dados seguros, fáceis de usar e de alto desempenho para tomadas de decisão inteligentes. Este facto desencadeou a necessidade de soluções de consultas analíticas eficientes, em que o modelo de bases de dados colunar é cada vez mais considerado o modelo mais eficiente para organização de dados em grandes bancos de dados. MonetDB é um sistema pioneiro no modelo de bases de dados colunar e atualmente está na vanguarda de DBMS’s de alto desempenho. Um motor Linear Algebra Querying (LAQ), que usa o paradigma de bases de dados colunar e fortemente inspirado em Álgebra Linear Tipada (TLA), foi desenvolvido numa antiga dissertação de mestrado em Engenharia Informática. O benchmarking do desempenho deste motor mostrou que supera DBMS tradicionais, mas não conseguiu superar o desempenho do MonetDB. Esta dissertação visa melhorar o desempenho do motor LAQ seguindo um caminho diferente: em vez de um motor autónomo, a nova abordagem implementa o motor sobre o motor do MonetDB estendido com RMA (Álgebra Relacional Matricial) e inspirado na abordagem de TLA. Isto permite o uso de scripts LAQ para substituir a abordagem da linguagem de consulta de álgebra relacional fornecida pelo SQL. Operações de matrizes comumente usadas em LAQ / TLA, como multiplicação de matrizes, produto Khatri-Rao ou produto Hadamard-Schur, tiveram de ser implementadas em RMA para mudar do paradigma da álgebra relacional para TLA. Uma análise completa do MonetDB / RMA mostrou a necessidade de implementar os principais operadores de TLA que não estão disponíveis no front-end. Esses operadores foram implementados, testados e validados com sucesso, abrindo caminho para um futuro benchmarking do seu desempenho com queries TPC-H / OLAP e consequente, ajuste do motor

    Towards an efficient OLAP engine based on linear algebra

    Get PDF
    Dissertação de mestrado integrado em Computer ScienceRelational database engines associated to the widely used Structured Query Language (SQL) are suffering unsatisfactory performance results in complex business queries, due to ever increasing volumes of stored data. To retrieve and process data in a more efficient way, Online Analytical Processing (OLAP) models have been proposed with an increased focus on attributes (measures and dimensions) over records. OLAP is based on a row-oriented theory, while a columnar-oriented theory could considerably improve the performance of analytical systems. The Typed Linear Algebra (TLA) approach is an example of such theory: it encodes each database attribute in a distinct matrix. These matrices are combined in a single Linear Algebra (LA) expression to obtain the result of a query. This dissertation combines concepts of relational databases, OLAP, TLA and performance engineering to design, implement and validate an efficient TLA-DB engine: SQL queries are converted into its equivalent LA expression, using Type Diagrams (TDs), which represent each matrix as an arrow pointing from the number of columns to the number of rows, TDs are converted to a LA expression encoded in Linear Algebra Query language (LAQ) and the LAQ script of a query is automatically coded in C Plus Plus (C++). An efficient TLA-DB engine required the encoding of the sparse matrices in an adequate format, namely Compressed Sparse Column (CSC), while the operations specified in LAQ expressions had their performance improved by optimised algorithms and an optimised query processor. The functionality of the resulting LAQ engine was validated with several TPC Benchmark H (TPC-H) queries for various dataset sizes. A comparative evaluation of the TLA-DB with two popular Database Management Systems (DBMSs), PostgreSQL and MySQL, showed that the developed framework outperforms both DBMSs in most TPC-H queries.As melhorias de desempenho dos sistemas de gestão de bases de dados relacionais não têm sido suficientes para acompanhar o crescimento do volume de dados com que são utilizados. Para colmatar a consequente necessidade de soluções mais eficientes, a teoria OLAP foi proposta. Esta introduz as noções de medidas e dimensões, guardando préagregações das medidas baseadas nas últimas, de forma a acelerar o processo de análise de dados. Contudo, ainda que com regras mais restritas, o OLAP está assente em álgebra relacional. A proposição de uma teoria orientada à coluna pode abrir portas a grandes melhorias de desempenho em consultas analíticas. A álgebra linear tipada é um bom exemplo. Segundo esta teoria, cada um dos atributos é convertido numa matriz independente, as quais são posteriormente combinadas através de uma expressão de álgebra linear que define o resultado da consulta. Esta dissertação combina conceitos de bases de dados relacionais, OLAP, álgebra linear, teoria de tipos, e computação eficiente para projetar, implementar e validar um motor OLAP robusto e eficiente. Para tal, consultas em SQL são convertidas para a expressão de álgebra linear equivalente, usando diagramas de tipo que representam cada matriz como uma seta a apontar do número de colunas para o número de linhas da matriz. A expressão que deles resulta é então codificada em LAQ e automaticamente implementada em C++. Para garantir a eficiencia da ferramenta desenvolvida, todas as matrizes foram guardadas num formato adequado, nomeadamente o CSC. Por sua vez, as operações especificadas na LAQ foram implementadas recorrendo a algoritmos optimizados. A correção do sistema implementado foi garantida através da validação dos resultados de um grupo de consultas extraidas do TPC-H, executadas sobre bases de dados de multiplos tamanhos. Finalmente, a comparação com dois sistemas de bases de dados convencionais (o PostgreSQL e o MySQL) nas métricas de tempo de execução e memória utilizada, demonstrou a maior eficiencia da ferramenta desenvolvida na maioria das consultas.This work was financed by the ERDF – European Regional Development Fund through the Operational Programme for Competitiveness and Internationalisation - COMPETE 2020 Programme within project «POCI-01-0145-FEDER-006961», and by National Funds through the Portuguese funding agency, FCT - Fundação para a Ciência e a Tecnologia as part of project «UID/EEA/50014/2013

    Scalable Querying of Nested Data

    Get PDF
    While large-scale distributed data processing platforms have become an attractive target for query processing, these systems are problematic for applications that deal with nested collections. Programmers are forced either to perform non-trivial translations of collection programs or to employ automated flattening procedures, both of which lead to performance problems. These challenges only worsen for nested collections with skewed cardinalities, where both handcrafted rewriting and automated flattening are unable to enforce load balancing across partitions. In this work, we propose a framework that translates a program manipulating nested collections into a set of semantically equivalent shredded queries that can be efficiently evaluated. The framework employs a combination of query compilation techniques, an efficient data representation for nested collections, and automated skew-handling. We provide an extensive experimental evaluation, demonstrating significant improvements provided by the framework in diverse scenarios for nested collection programs
    corecore