We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Optimizing Queries Using CTEs and Window Functions

Formale Metadaten

Titel
Optimizing Queries Using CTEs and Window Functions
Alternativer Titel
Speeding Up Analytical Queries in MariaDB: CTE's and Window Functions Highlight
Serientitel
Anzahl der Teile
611
Autor
Lizenz
CC-Namensnennung 2.0 Belgien:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache
Produktionsjahr2017

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
Window functions are an important tool for analytical queries. Windowfunctions act as regular functions but have access to more than one row duringcomputation. This makes them highly useful for optimising queries involvingself-joins, as well as queries that need to extract data from multiple relatedrows from the same table. The performance speedups obtained are sometimes 100fold. This talk will explain how that is possible, as well as use cases forwindow functions. On top of that, window functions pair well with another feature that MariaDB10.2 has introduced - Common Table Expressions. This feature was contributedby a community member and helps make queries more maintainable and sometimesfaster. This feature will be covered, mostly through the use of windowfunctions, but also introduce new use cases. The agenda for the talk is: * What are CTEs * What are window functions * Solving problems with regular SQL and window functions * Smoothing data * Top-N Queries * Difference between consecutive rows