MariaDB 10.3 supports system-versioned tables, or temporal tables. This allows us to query data as they were at any point in time, or how they evolved in a certain time period.
This document provides an overview of temporal tables in MariaDB. It discusses:
- The history of temporal table implementations in proprietary and open source databases.
- How MariaDB supports both system-time and application-time temporal tables, allowing tables to track changes over time.
- Examples of creating and querying application-time tables to track ticket changes, and system-versioning tables to store row versions.
- Best practices for indexes, queries, and handling deletes/updates when using temporal tables.
- Potential future extensions and limitations, like improved datetime support and issues with certain storage engines.
This document provides an overview of BigQuery and how to get started with it. BigQuery is a fully managed data warehouse offered by Google Cloud Platform. It offers a serverless, fast, and scalable solution for data analysis. The document discusses what BigQuery is, its key features and concepts like datasets, tables, and billing. It also covers best practices for query performance and cost optimization. The presenter provides their contact details and links to their website and YouTube channel for additional resources.
When building an Event Sourcing system, can we change the past? Can we also forecast “events” in the future?
If we want to provide various projections/visions of things that hapenned over the time, what are the consequences and trade-offs on our code?
All these questions will be answered during this talk. But moreover, I'll tell you our learning story about Bi-temporal Event Sourcing. Yet another illustration of the power of modeling, sketches and concrete examples when we need to understand each others.
***** Talend Training: https://www.edureka.co/talend-for-big-data *****
This Edureka tutorial on Talend Components will demonstrate the usage of few of the majorly used components in Talend like tMap, tJoin, tFileInputDelimited, tMysqlRow etc.This video helps you to learn the following topics:
1. What is Talend?
2. Talend Component Families
3. Talend File Components
4. Talend Processing Components
5. Talend Database Components
Flink provides unified batch and stream processing. It natively supports streaming dataflows, long batch pipelines, machine learning algorithms, and graph analysis through its layered architecture and treatment of all computations as data streams. Flink's optimizer selects efficient execution plans such as shipping strategies and join algorithms. It also caches loop-invariant data to speed up iterative algorithms and graph processing.
Design and develop with performance in mind
Establish a tuning environment
Index wisely
Reduce parsing
Take advantage of Cost Based Optimizer
Avoid accidental table scans
Optimize necessary table scans
Optimize joins
Use array processing
Consider PL/SQL for “tricky” SQL
PostgreSQL Conference Japan 2018
[B3] Let's scale-out PostgreSQL using Citus
https://www.postgresql.jp/jpug-pgcon2018
English Version
Apache Pinot Meetup At LinkedIn, Sept02, 2020. Video recording: https://www.youtube.com/playlist?list=PLihIrF0tCXddhXkQdAdnmfs8FtYMfrbTl
The document discusses tuning Oracle GoldenGate performance, including available tools for monitoring replication lag and throughput. It presents a case study examining lag times of over 1 hour 30 minutes for a replication configuration and uses tools like the Streams Performance Advisor and lag reports to identify potential bottlenecks. Recommendations are provided for configuration changes and monitoring to improve replication performance.
Google BigQuery is Google's fully managed big data analytics service that allows users to analyze very large datasets. It offers a fast and easy to use service with no infrastructure to manage. Developers can stream up to 100,000 rows of data per second for near real-time analysis. BigQuery bills users per project on a pay-as-you-go model, with the first 1TB of data processed each month free of charge.
This document provides an overview of triggers in Salesforce, including what they are, the types of triggers, syntax, context variables, and order of execution. Triggers allow Apex code to execute based on database events like insert, update, delete. There are before and after triggers. The order of execution for a record save involves running before/after triggers, validation rules, workflow rules, roll-up summaries and more in a defined sequence. Context variables provide information about the trigger event within the trigger code.
Dynamic filtering for presto join optimisationOri Reshef
@Roman Zeyde Explains how to optimize Presto Joins in selective use cases.
Roman is a Talpiot graduate and an ex-googler, today working as Varada presto architect.
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...Edureka!
The document discusses Extract, Transform, Load (ETL) and Talend as an ETL tool. It states that ETL provides a one-stop solution for issues like data being scattered across different locations and sources, in different formats and volumes increasing. It describes the three processes of ETL - extract, transform and load. It then discusses Talend as an open-source ETL tool, how Talend Open Studio can easily manage the ETL process with drag-and-drop functionality, and its strong connectivity and smooth extraction and transformation capabilities.
Talend provides data integration and management solutions. It focuses on combining data from different sources into a unified view for users. Talend offers an open source tool called Talend Open Studio that allows users to visually design procedures to extract, transform, and load data between various databases and file types. It also offers features for data quality, storage optimization, master data management, and reporting.
2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...Andrew Lamb
DataFusion is an extensible and embeddable query engine, written in Rust used to create modern, fast and efficient data pipelines, ETL processes, and database systems.
This presentation explains where it fits into the data eco system and how it helps implement your system in Rust
Building Better Data Pipelines using Apache AirflowSid Anand
Apache Airflow is a platform for authoring, scheduling, and monitoring workflows or directed acyclic graphs (DAGs). It allows users to programmatically author DAGs in Python without needing to bundle many XML files. The UI provides a tree view to see DAG runs over time and Gantt charts to see performance trends. Airflow is useful for ETL pipelines, machine learning workflows, and general job scheduling. It handles task dependencies and failures, monitors performance, and enforces service level agreements. Behind the scenes, the scheduler distributes tasks from the metadata database to Celery workers via RabbitMQ.
Window functions enable calculations across partitions of rows in a result set. This document discusses window function syntax, types of window functions available in MySQL 8.0 like RANK(), DENSE_RANK(), ROW_NUMBER(), and provides examples of queries using window functions to analyze and summarize data in partitions.
This presentation is an attempt do demystify the practice of building reliable data processing pipelines. We go through the necessary pieces needed to build a stable processing platform: data ingestion, processing engines, workflow management, schemas, and pipeline development processes. The presentation also includes component choice considerations and recommendations, as well as best practices and pitfalls to avoid, most learnt through expensive mistakes.
An Oracle database consists of physical files on disk that store data and logical memory structures that manage the files. The database is made up of data files that contain tables and indexes, control files that track the physical components, and redo log files that record changes. The instance in memory associates with one database and manages access through background processes. The database is divided into logical storage units called tablespaces that map to the physical data files. Common tablespaces include SYSTEM, SYSAUX, undo and temporary tablespaces.
My Talk at GCPUG-Taiwan on 2015/5/8.
You use BigQuery with SQL, but the internal work of BigQuery is very different from traditional Relational Database systems you may familiar with.
One of the way to understand how BigQuery works is to see it from the cost you pay for BigQuery. Knowing how to save money while using BigQuery is to know how BigQuery works to some extent.
In this session, let’s talk about practical knowledge (saving money) and exciting technology (how BigQuery works)!
Cluster computing frameworks such as Hadoop or Spark are tremendously beneficial in processing and deriving insights from data. However, long query latencies make these frameworks sub-optimal choices to power interactive applications. Organizations frequently rely on dedicated query layers, such as relational databases and key/value stores, for faster query latencies, but these technologies suffer many drawbacks for analytic use cases. In this session, we discuss using Druid for analytics and why the architecture is well suited to power analytic applications.
User-facing applications are replacing traditional reporting interfaces as the preferred means for organizations to derive value from their datasets. In order to provide an interactive user experience, user interactions with analytic applications must complete in an order of milliseconds. To meet these needs, organizations often struggle with selecting a proper serving layer. Many serving layers are selected because of their general popularity without understanding the possible architecture limitations.
Druid is an analytics data store designed for analytic (OLAP) queries on event data. It draws inspiration from Google’s Dremel, Google’s PowerDrill, and search infrastructure. Many enterprises are switching to Druid for analytics, and we will cover why the technology is a good fit for its intended use cases.
Speaker
Nishant Bangarwa, Software Engineer, Hortonworks
This document provides a summary of the Solr search platform. It begins with introductions from the presenter and about Lucid Imagination. It then discusses what Solr is, how it works, who uses it, and its main features. The rest of the document dives deeper into topics like how Solr is configured, how to index and search data, and how to debug and customize Solr implementations. It promotes downloading and experimenting with Solr to learn more.
Airflow is a platform created by Airbnb to automate and schedule workflows. It uses a Directed Acyclic Graph (DAG) structure to define dependencies between tasks, and allows scheduling tasks on a timetable or triggering them manually. Some key features include monitoring task status, resuming failed tasks, backfilling historical data, and a web-based user interface. While additional databases are required for high availability, Airflow provides a flexible way to model complex data workflows as code.
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTanel Poder
From Tanel Poder's Troubleshooting Complex Performance Issues series - an example of Oracle SEG$ internal segment contention due to some direct path insert activity.
This document discusses using ClickHouse for experimentation and metrics at Spotify. It describes how Spotify built an experimentation platform using ClickHouse to provide teams interactive queries on granular metrics data with low latency. Key aspects include ingesting data from Google Cloud Storage to ClickHouse daily, defining metrics through a centralized catalog, and visualizing metrics and running queries using Superset connected to ClickHouse. The platform aims to reduce load on notebooks and BigQuery by serving common queries directly from ClickHouse.
Apache Calcite is a dynamic data management framework. Think of it as a toolkit for building databases: it has an industry-standard SQL parser, validator, highly customizable optimizer (with pluggable transformation rules and cost functions, relational algebra, and an extensive library of rules), but it has no preferred storage primitives. In this tutorial, the attendees will use Apache Calcite to build a fully fledged query processor from scratch with very few lines of code. This processor is a full implementation of SQL over an Apache Lucene storage engine. (Lucene does not support SQL queries and lacks a declarative language for performing complex operations such as joins or aggregations.) Attendees will also learn how to use Calcite as an effective tool for research.
Advanced MariaDB features that developers love.pdfFederico Razzoli
MariaDB is one of the most widely used relational databases. It is compatible with MySQL for most practical purposes, and it is appreciated by developers communities all over the world.
Over the years, MariaDB has developed many features that are extremely useful for developers, saving a lot of development time and enabling its use in situations where it wouldn't be practical otherwise.
In this talk, we'll briefly discuss some of those features and why they are so useful. We'll talk about:
* Querying remote or heterogeneous data sources in SQL;
* Using temporal tables to analyse how data changes over time;
* Using JSON in a relational database;
* Miscellaneous tips and tricks.
Webinar - MariaDB Temporal Tables: a demonstrationFederico Razzoli
MariaDB Temporal Tables are useful to track how data change over time, and to handle data that refer to specific time periods.
In this webinar I showed:
* Which problems Temporal Tables solve
* How to create Temporal Tables
* How to turn regular tables into Temporal Tables
* Best practices
* Examples of what can be done with Temporal Tables
The document discusses tuning Oracle GoldenGate performance, including available tools for monitoring replication lag and throughput. It presents a case study examining lag times of over 1 hour 30 minutes for a replication configuration and uses tools like the Streams Performance Advisor and lag reports to identify potential bottlenecks. Recommendations are provided for configuration changes and monitoring to improve replication performance.
Google BigQuery is Google's fully managed big data analytics service that allows users to analyze very large datasets. It offers a fast and easy to use service with no infrastructure to manage. Developers can stream up to 100,000 rows of data per second for near real-time analysis. BigQuery bills users per project on a pay-as-you-go model, with the first 1TB of data processed each month free of charge.
This document provides an overview of triggers in Salesforce, including what they are, the types of triggers, syntax, context variables, and order of execution. Triggers allow Apex code to execute based on database events like insert, update, delete. There are before and after triggers. The order of execution for a record save involves running before/after triggers, validation rules, workflow rules, roll-up summaries and more in a defined sequence. Context variables provide information about the trigger event within the trigger code.
Dynamic filtering for presto join optimisationOri Reshef
@Roman Zeyde Explains how to optimize Presto Joins in selective use cases.
Roman is a Talpiot graduate and an ex-googler, today working as Varada presto architect.
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...Edureka!
The document discusses Extract, Transform, Load (ETL) and Talend as an ETL tool. It states that ETL provides a one-stop solution for issues like data being scattered across different locations and sources, in different formats and volumes increasing. It describes the three processes of ETL - extract, transform and load. It then discusses Talend as an open-source ETL tool, how Talend Open Studio can easily manage the ETL process with drag-and-drop functionality, and its strong connectivity and smooth extraction and transformation capabilities.
Talend provides data integration and management solutions. It focuses on combining data from different sources into a unified view for users. Talend offers an open source tool called Talend Open Studio that allows users to visually design procedures to extract, transform, and load data between various databases and file types. It also offers features for data quality, storage optimization, master data management, and reporting.
2022-06-23 Apache Arrow and DataFusion_ Changing the Game for implementing Da...Andrew Lamb
DataFusion is an extensible and embeddable query engine, written in Rust used to create modern, fast and efficient data pipelines, ETL processes, and database systems.
This presentation explains where it fits into the data eco system and how it helps implement your system in Rust
Building Better Data Pipelines using Apache AirflowSid Anand
Apache Airflow is a platform for authoring, scheduling, and monitoring workflows or directed acyclic graphs (DAGs). It allows users to programmatically author DAGs in Python without needing to bundle many XML files. The UI provides a tree view to see DAG runs over time and Gantt charts to see performance trends. Airflow is useful for ETL pipelines, machine learning workflows, and general job scheduling. It handles task dependencies and failures, monitors performance, and enforces service level agreements. Behind the scenes, the scheduler distributes tasks from the metadata database to Celery workers via RabbitMQ.
Window functions enable calculations across partitions of rows in a result set. This document discusses window function syntax, types of window functions available in MySQL 8.0 like RANK(), DENSE_RANK(), ROW_NUMBER(), and provides examples of queries using window functions to analyze and summarize data in partitions.
This presentation is an attempt do demystify the practice of building reliable data processing pipelines. We go through the necessary pieces needed to build a stable processing platform: data ingestion, processing engines, workflow management, schemas, and pipeline development processes. The presentation also includes component choice considerations and recommendations, as well as best practices and pitfalls to avoid, most learnt through expensive mistakes.
An Oracle database consists of physical files on disk that store data and logical memory structures that manage the files. The database is made up of data files that contain tables and indexes, control files that track the physical components, and redo log files that record changes. The instance in memory associates with one database and manages access through background processes. The database is divided into logical storage units called tablespaces that map to the physical data files. Common tablespaces include SYSTEM, SYSAUX, undo and temporary tablespaces.
My Talk at GCPUG-Taiwan on 2015/5/8.
You use BigQuery with SQL, but the internal work of BigQuery is very different from traditional Relational Database systems you may familiar with.
One of the way to understand how BigQuery works is to see it from the cost you pay for BigQuery. Knowing how to save money while using BigQuery is to know how BigQuery works to some extent.
In this session, let’s talk about practical knowledge (saving money) and exciting technology (how BigQuery works)!
Cluster computing frameworks such as Hadoop or Spark are tremendously beneficial in processing and deriving insights from data. However, long query latencies make these frameworks sub-optimal choices to power interactive applications. Organizations frequently rely on dedicated query layers, such as relational databases and key/value stores, for faster query latencies, but these technologies suffer many drawbacks for analytic use cases. In this session, we discuss using Druid for analytics and why the architecture is well suited to power analytic applications.
User-facing applications are replacing traditional reporting interfaces as the preferred means for organizations to derive value from their datasets. In order to provide an interactive user experience, user interactions with analytic applications must complete in an order of milliseconds. To meet these needs, organizations often struggle with selecting a proper serving layer. Many serving layers are selected because of their general popularity without understanding the possible architecture limitations.
Druid is an analytics data store designed for analytic (OLAP) queries on event data. It draws inspiration from Google’s Dremel, Google’s PowerDrill, and search infrastructure. Many enterprises are switching to Druid for analytics, and we will cover why the technology is a good fit for its intended use cases.
Speaker
Nishant Bangarwa, Software Engineer, Hortonworks
This document provides a summary of the Solr search platform. It begins with introductions from the presenter and about Lucid Imagination. It then discusses what Solr is, how it works, who uses it, and its main features. The rest of the document dives deeper into topics like how Solr is configured, how to index and search data, and how to debug and customize Solr implementations. It promotes downloading and experimenting with Solr to learn more.
Airflow is a platform created by Airbnb to automate and schedule workflows. It uses a Directed Acyclic Graph (DAG) structure to define dependencies between tasks, and allows scheduling tasks on a timetable or triggering them manually. Some key features include monitoring task status, resuming failed tasks, backfilling historical data, and a web-based user interface. While additional databases are required for high availability, Airflow provides a flexible way to model complex data workflows as code.
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTanel Poder
From Tanel Poder's Troubleshooting Complex Performance Issues series - an example of Oracle SEG$ internal segment contention due to some direct path insert activity.
This document discusses using ClickHouse for experimentation and metrics at Spotify. It describes how Spotify built an experimentation platform using ClickHouse to provide teams interactive queries on granular metrics data with low latency. Key aspects include ingesting data from Google Cloud Storage to ClickHouse daily, defining metrics through a centralized catalog, and visualizing metrics and running queries using Superset connected to ClickHouse. The platform aims to reduce load on notebooks and BigQuery by serving common queries directly from ClickHouse.
Apache Calcite is a dynamic data management framework. Think of it as a toolkit for building databases: it has an industry-standard SQL parser, validator, highly customizable optimizer (with pluggable transformation rules and cost functions, relational algebra, and an extensive library of rules), but it has no preferred storage primitives. In this tutorial, the attendees will use Apache Calcite to build a fully fledged query processor from scratch with very few lines of code. This processor is a full implementation of SQL over an Apache Lucene storage engine. (Lucene does not support SQL queries and lacks a declarative language for performing complex operations such as joins or aggregations.) Attendees will also learn how to use Calcite as an effective tool for research.
Advanced MariaDB features that developers love.pdfFederico Razzoli
MariaDB is one of the most widely used relational databases. It is compatible with MySQL for most practical purposes, and it is appreciated by developers communities all over the world.
Over the years, MariaDB has developed many features that are extremely useful for developers, saving a lot of development time and enabling its use in situations where it wouldn't be practical otherwise.
In this talk, we'll briefly discuss some of those features and why they are so useful. We'll talk about:
* Querying remote or heterogeneous data sources in SQL;
* Using temporal tables to analyse how data changes over time;
* Using JSON in a relational database;
* Miscellaneous tips and tricks.
Webinar - MariaDB Temporal Tables: a demonstrationFederico Razzoli
MariaDB Temporal Tables are useful to track how data change over time, and to handle data that refer to specific time periods.
In this webinar I showed:
* Which problems Temporal Tables solve
* How to create Temporal Tables
* How to turn regular tables into Temporal Tables
* Best practices
* Examples of what can be done with Temporal Tables
MariaDB Server 10.3 - Temporale Daten und neues zur DB-KompatibilitätMariaDB plc
MariaDB Server 10.3 (RC) introduces enhancements for temporal data support, database compatibility, performance, flexibility, and scalability. Key features include system versioned tables for querying historical data, PL/SQL compatibility for stored functions, sequences, intersect and except operators, and user-defined aggregate functions. The Spider storage engine is also updated.
MariaDB Server 10.3 provides enhancements for temporal data support, database compatibility, and performance. Key features include:
- System versioned tables to store and query historical data at different points in time.
- Improved Oracle compatibility with features like PL/SQL parsing, packages for stored functions, sequences, and additional data types.
- Performance improvements such as adding instant columns for InnoDB and statement-based lock wait timeouts.
- Other new features include user-defined aggregate functions, compressed columns, and proxy protocol support.
This presentations shows how to create a time/date dimension for PowerPivot from the date data in your fact table. I also shows the DAX functions that you can use to add columns to the fact table or a separate dimension table.
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1MariaDB plc
MariaDB Server 10.2 includes several new features for analytics, JSON, replication, database compatibility, storage engines, security, administration, performance, and optimizations. Some key additions include window functions and common table expressions for more efficient queries, JSON and GeoJSON functions, delayed and compressed replication, multi-trigger support, CHECK constraints, indexes on virtual columns, the MyRocks storage engine, per-user load limitations, and TLS connections. MaxScale 2.1 provides up to 2.8x performance gains along with new security features like encrypted binlogs and LDAP authentication as well as support for Aurora clusters and dynamic configurations.
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1MariaDB plc
The document provides an overview of new features and enhancements in MariaDB Server 10.2 and MaxScale 2.1. For MariaDB Server 10.2, key additions include window functions, common table expressions, JSON and GeoJSON functions, new replication features like delayed replication, storage engine enhancements including a new MyRocks storage engine, and performance optimizations. MaxScale 2.1 focuses on performance improvements up to 2.8x faster, enhanced security features like encrypted binlogs and SSL, and support for Aurora clusters and dynamic configuration.
PostgreSQL 9.5 includes several new features to improve performance and functionality for developers:
UPSERT allows inserting or updating a row based on unique constraints. BRIN indexes provide very small indexes ideal for large naturally ordered tables. GROUPING SETS, CUBE and ROLLUP allow multiple groupings in a single query. Row-level security policies control access at the row level. SKIP LOCKED ignores locked rows. TABLESAMPLE selects random rows. IMPORT FOREIGN SCHEMA simplifies importing schemas from other databases. Foreign tables can now participate in inheritance. JSONB documents can be modified and merged. Sorting performance is improved with abbreviated keys. Parallel vacuuming allows vacuum operations to use multiple processes.
Instant add column for inno db in mariadb 10.3+ (fosdem 2018, second draft)Valerii Kravchuk
My slides for (canceled due to personal issues) talk for FOSDEM 2018 MySQL Devroom. I planned to discuss the history of ALTER TABLE speedup and optimization in MySQL, explain the implementation of instant ADD COLUMN for InnoDB tables in MariaDB 10.3 and compare performance of recent versions of MariaDB 10.2, 10.3, Percona Server 5.7, MyRocks from MariaDB 10.2 and MySQL 8.0.4 while working on multiple step test case incolving ALTER TABLE ... ADD COLUMN.
A lof of links to related manuals, blog posts and resources are presented.
This document provides an overview of SQL analytic queries and tips and tricks, mostly related to PostgreSQL. It begins with an introduction on the topics to be covered, including SQL basics, advanced topics, and a conclusion. It then shares some lesser known facts about SQL, including that it is standardized, turing complete, and the only successful 4th generation programming language. The document reviews the revision history of SQL standards from 1986 to the present. It provides examples of common table expressions, temporary tables, unnesting and aggregation, subqueries, and lateral joins in SQL.
How Database Convergence Impacts the Coming Decades of Data ManagementSingleStore
How Database Convergence Impacts the Coming Decades of Data Management by Nikita Shamgunov, CEO and co-founder of MemSQL.
Presented at NYC Database Month in October 2017. NYC Database Month is the largest database meetup in New York, featuring talks from leaders in the technology space. You can learn more at http://www.databasemonth.com.
Back to the future - Temporal Table in SQL Server 2016Stéphane Fréchette
SQL Server 2016 CTP2 introduced support for temporal tables as a database feature that provides built-in support for provide information about data stored in the table at any point in time rather than only the data that is correct at the current moment in time.
Topics will cover:
What is a Temporal Table?, Why Temporal? How does this work?, When to use (use cases) and demos...
AMIS organiseerde op maandagavond 15 juli het seminar ‘Oracle database 12c revealed’. Deze avond bood AMIS Oracle professionals de eerste mogelijkheid om de vernieuwingen in Oracle database 12c in actie te zien! De AMIS specialisten die meer dan een jaar bèta testen hebben uitgevoerd lieten zien wat er nieuw is en hoe we dat de komende jaren gaan inzetten!
Deze presentatie is deze avond gegeven in de vorm van een parallelsessie.
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)Dave Stokes
MySQL 8 has many new features and this presentation covers the new data dictionary, improved JSON functions, roles, histograms, and much more. Updated after SunshinePHP 2018 after feedback
This document provides an introduction and overview of PostgreSQL, including its history, features, installation, usage and SQL capabilities. It describes how to create and manipulate databases, tables, views, and how to insert, query, update and delete data. It also covers transaction management, functions, constraints and other advanced topics.
Arthur Luz is a data insights consultant at Microsoft who gave a presentation on SQL Server 2016 temporal tables. The presentation included an overview of history tables, demonstrations of creating temporal tables and manipulating historical data, considerations for using temporal tables regarding resources, and differences between change data capture and temporal tables. New features for temporal tables include support for in-memory tables which allow for hybrid transactional/analytical processing scenarios.
Using histograms to provide better query performance in MariaDB. Histograms capture the distribution of values in columns to help the query optimizer select better execution plans. The optimizer needs statistics on data distributions to estimate query costs accurately. Histograms are not enabled by default but can be collected using ANALYZE TABLE with the PERSISTENT option. Making histograms available improves the performance of queries that have selective filters or ordering on non-indexed columns.
How to use histograms to get better performanceMariaDB plc
Sergei Petrunia and Varun Gupta, software engineers MariaDB, show how histograms can be used to improve query performance. They begin by introducing histrograms and explaining why they’re needed by the query optimizer. Next, they discuss how to determine whether or not histrograms are needed, and if so, how to determine which tables and columns they should be applied. Finally, they cover best practices and recent improvements to histograms.
MariaDB Data Protection: Backup Strategies for the Real WorldFederico Razzoli
Is your database backup strategy bulletproof? Join us for an in-depth exploration of MariaDB backup solutions that will help you sleep better at night.
In this webinar, we'll explore the following MariaDB backup methods:
- Logical backups (dumps);
- Snapshots;
- File copy;
- Mariabackup;
- The binary log as incremental backup.
You'll learn critical insights into each backup method's strengths and limitations, enabling you to make informed decisions for your specific environment. We'll also tackle essential practical considerations including backup monitoring best practices, setting achievable recovery time objectives (RTOs) and recovery point targets (RPTs), secure backup storage strategies, and designing a robust backup framework that scales with your needs.
Whether you're managing a small database or enterprise-level deployments, you'll walk away with actionable knowledge to implement a reliable, efficient backup strategy that protects your valuable data.
Perfect for database administrators, system engineers, devops, and anyone responsible for database uptime in their organisation.
For better scalability, MariaDB and MySQL are deployed with a High Availability solution, which consists in data replication among multiple servers. But this poses some small challenges to the code, that developers should know about. They should actually turn these challenges into opportunities that will make their applications even more scalable. Let's see how.
Webinar: Designing a schema for a Data WarehouseFederico Razzoli
Are you new to data warehouses (DWH)? Do you need to check whether your data warehouse follows the best practices for a good design? In both cases, this webinar is for you.
A data warehouse is a central relational database that contains all measurements about a business or an organisation. This data comes from a variety of heterogeneous data sources, which includes databases of any type that back the applications used by the company, data files exported by some applications, or APIs provided by internal or external services.
But designing a data warehouse correctly is a hard task, which requires gathering information about the business processes that need to be analysed in the first place. These processes must be translated into so-called star schemas, which means, denormalised databases where each table represents a dimension or facts.
We will discuss these topics:
- How to gather information about a business;
- Understanding dictionaries and how to identify business entities;
- Dimensions and facts;
- Setting a table granularity;
- Types of facts;
- Types of dimensions;
- Snowflakes and how to avoid them;
- Expanding existing dimensions and facts.
High-level architecture of a complete MariaDB deploymentFederico Razzoli
In this webinar Federico will illustrate how to design a complete MariaDB setup. This doesn't only include MariaDB, but all the components that are necessary to form a reliable, scalable architecture.
Federico will cover these points:
- MariaDB storage engines
- Asynchronous replication vs Galera
- Load balancing and failover: ProxySQL, MaxScale, HAProxy
- Eliminating SPoFs in the proxy level
- Backup strategies
- Monitoring solutions
Webinar - Unleash AI power with MySQL and MindsDBFederico Razzoli
MindsDB enormously simplifies the process of making machine learning based predictions. Intead of developing a model and prepare data, you can connect MindsDB to an external data source (such as MySQL, PostgreSQL, other databases, or APIs) and run SQL queries about the future. Any AI engine (predictive algorithm) can be used.
MariaDB best practices for user and permissions management, secrets storage, SSL, encryption at rest, and more. Includes an overview of MariaDB most advanced security features. Webinar organised in December 2023.
A first look at MariaDB 11.x features and ideas on how to use themFederico Razzoli
From my webinar "A first look at MariaDB 11.x features
and ideas on how to use them", from November 2023. I talked about the features introduced in MariaDB versions 11.0 to 11.3, not yet production-ready. For some features, I provided ideas about how they can be used.
MariaDB stored procedures and why they should be improvedFederico Razzoli
This document discusses improvements that could be made to MariaDB stored procedures. It begins by explaining why stored procedures are useful from a user and community perspective. It then outlines currently limitations with MariaDB stored procedures, such as them being too slow and missing features that make development easier. The document proposes several specific improvements, such as supporting external programming languages like Python, adding more flexible input/output features, and implementing optimizations like inline functions and deterministic function caching. It concludes by suggesting adding support for array types and polymorphic types to MariaDB stored procedures.
Webinar - Key Reasons to Upgrade to MySQL 8.0 or MariaDB 10.11Federico Razzoli
- MySQL 5.7 is no longer supported and will not receive any bugfixes or security updates after October 2023. Users need to upgrade to either MySQL 8.0 or MariaDB 10.11.
- MySQL is developed by Oracle while MariaDB has its own independent foundation. MariaDB aims to be compatible with MySQL but also has unique features like storage engines.
- Both MySQL 8.0 and MariaDB 10.11 are good options to upgrade to. Users should consider each product's unique features and governance model as well as test which one works better for their applications and use cases.
Webinar: MariaDB 10.11 key features overview for DBAs
Orgnised by Vettabase
27 April 2023
Amongst other topics:
- Long ALTER TABLES now don’t cause replicas to lag
- InnoDB configuration is now more dynamic, and certain important variables can be modified without a restart
- Populating an empty table is now much faster
- New data types: UUID, INET4, INET6
- SFORMAT() function, NATURAL_KEY_SORT() function
Recent MariaDB features to learn for a happy lifeFederico Razzoli
After MariaDB 10.6 LTS was made available last year, three Short Term Support versions were released. While they shouldn’t be used in production, they allow us to test the features that will be included in the next LTS version. I follow the development of MariaDB through their JIRA, I test the new features, and I regularly review each new major version on the Vettabase website. In this talk I will summarise the most relevant features, show how to use them, and discuss how we can leverage them for real-world cases.
MariaDB, MySQL and Ansible: automating database infrastructuresFederico Razzoli
This document summarizes a talk on automating database infrastructures using MariaDB, MySQL and Ansible. It discusses Ansible concepts like inventories, modules, playbooks, roles, plays, variables and facts. It provides code examples of using Ansible to automate the deployment and configuration of MariaDB and MySQL database servers through plays, roles, variables and templates. It also discusses best practices for making tasks idempotent, using conditional tasks, tags and validating variables.
CONNECT is a storage engine for MariaDB. It allows to use external, possibly remote data sources of several types. We can then query them as if they were local relational tables. In this presentation, Federico Razzoli demonstrates a couple of interesting things we can do with it. The talk took place at MariaDB Server Fest 2020.
It's easy to see antipatterns in production databases. Our schemas should be simple but extensible, and allow fast SQL queries. In this webinar I discuss what most common antipatterns are, and how to correct them.
MySQL backups overview. Characteristics of every backup type, including dumps, Xtrabackup and snapshots. Planning proper backup strategies. Why and how to test backups.
JSON data can be inserted in MySQL/MariaDB databases, combining the schemaful and schemaless approaches to obtain powerful results. We can combine them with features like indexes, checks, foreign keys, as well as the JSON Schema and JSON Path languages.
How MySQL can boost (or kill) your application v2Federico Razzoli
This document provides tips for optimizing MySQL performance for applications. It discusses good practices for the MySQL configuration file such as enabling the slow query log and performance schema. It also covers using indexes appropriately, avoiding N+1 queries, performing operations like counting and deleting in SQL rather than application code, and properly using transactions.
MySQL Transaction Isolation Levels (lightning talk)Federico Razzoli
Let's discuss MariaDB/MySQL isolation levels. Understanding them means to know how your DBMS can protect you from anomalies, and how to apply potentially important optimisations.
Why Orangescrum Is a Game Changer for Construction Companies in 2025Orangescrum
Orangescrum revolutionizes construction project management in 2025 with real-time collaboration, resource planning, task tracking, and workflow automation, boosting efficiency, transparency, and on-time project delivery.
FL Studio Producer Edition Crack 2025 Full Versiontahirabibi60507
Copy & Past Link 👉👉
http://drfiles.net/
FL Studio is a Digital Audio Workstation (DAW) software used for music production. It's developed by the Belgian company Image-Line. FL Studio allows users to create and edit music using a graphical user interface with a pattern-based music sequencer.
Solidworks Crack 2025 latest new + license codeaneelaramzan63
Copy & Paste On Google >>> https://dr-up-community.info/
The two main methods for installing standalone licenses of SOLIDWORKS are clean installation and parallel installation (the process is different ...
Disable your internet connection to prevent the software from performing online checks during installation
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AIdanshalev
If we were building a GenAI stack today, we'd start with one question: Can your retrieval system handle multi-hop logic?
Trick question, b/c most can’t. They treat retrieval as nearest-neighbor search.
Today, we discussed scaling #GraphRAG at AWS DevOps Day, and the takeaway is clear: VectorRAG is naive, lacks domain awareness, and can’t handle full dataset retrieval.
GraphRAG builds a knowledge graph from source documents, allowing for a deeper understanding of the data + higher accuracy.
Who Watches the Watchmen (SciFiDevCon 2025)Allon Mureinik
Tests, especially unit tests, are the developers’ superheroes. They allow us to mess around with our code and keep us safe.
We often trust them with the safety of our codebase, but how do we know that we should? How do we know that this trust is well-deserved?
Enter mutation testing – by intentionally injecting harmful mutations into our code and seeing if they are caught by the tests, we can evaluate the quality of the safety net they provide. By watching the watchmen, we can make sure our tests really protect us, and we aren’t just green-washing our IDEs to a false sense of security.
Talk from SciFiDevCon 2025
https://www.scifidevcon.com/courses/2025-scifidevcon/contents/680efa43ae4f5
Adobe Master Collection CC Crack Advance Version 2025kashifyounis067
🌍📱👉COPY LINK & PASTE ON GOOGLE http://drfiles.net/ 👈🌍
Adobe Master Collection CC (Creative Cloud) is a comprehensive subscription-based package that bundles virtually all of Adobe's creative software applications. It provides access to a wide range of tools for graphic design, video editing, web development, photography, and more. Essentially, it's a one-stop-shop for creatives needing a broad set of professional tools.
Key Features and Benefits:
All-in-one access:
The Master Collection includes apps like Photoshop, Illustrator, InDesign, Premiere Pro, After Effects, Audition, and many others.
Subscription-based:
You pay a recurring fee for access to the latest versions of all the software, including new features and updates.
Comprehensive suite:
It offers tools for a wide variety of creative tasks, from photo editing and illustration to video editing and web development.
Cloud integration:
Creative Cloud provides cloud storage, asset sharing, and collaboration features.
Comparison to CS6:
While Adobe Creative Suite 6 (CS6) was a one-time purchase version of the software, Adobe Creative Cloud (CC) is a subscription service. CC offers access to the latest versions, regular updates, and cloud integration, while CS6 is no longer updated.
Examples of included software:
Adobe Photoshop: For image editing and manipulation.
Adobe Illustrator: For vector graphics and illustration.
Adobe InDesign: For page layout and desktop publishing.
Adobe Premiere Pro: For video editing and post-production.
Adobe After Effects: For visual effects and motion graphics.
Adobe Audition: For audio editing and mixing.
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...Egor Kaleynik
This case study explores how we partnered with a mid-sized U.S. healthcare SaaS provider to help them scale from a successful pilot phase to supporting over 10,000 users—while meeting strict HIPAA compliance requirements.
Faced with slow, manual testing cycles, frequent regression bugs, and looming audit risks, their growth was at risk. Their existing QA processes couldn’t keep up with the complexity of real-time biometric data handling, and earlier automation attempts had failed due to unreliable tools and fragmented workflows.
We stepped in to deliver a full QA and DevOps transformation. Our team replaced their fragile legacy tests with Testim’s self-healing automation, integrated Postman and OWASP ZAP into Jenkins pipelines for continuous API and security validation, and leveraged AWS Device Farm for real-device, region-specific compliance testing. Custom deployment scripts gave them control over rollouts without relying on heavy CI/CD infrastructure.
The result? Test cycle times were reduced from 3 days to just 8 hours, regression bugs dropped by 40%, and they passed their first HIPAA audit without issue—unlocking faster contract signings and enabling them to expand confidently. More than just a technical upgrade, this project embedded compliance into every phase of development, proving that SaaS providers in regulated industries can scale fast and stay secure.
AgentExchange is Salesforce’s latest innovation, expanding upon the foundation of AppExchange by offering a centralized marketplace for AI-powered digital labor. Designed for Agentblazers, developers, and Salesforce admins, this platform enables the rapid development and deployment of AI agents across industries.
Email: [email protected]
Phone: +1(630) 349 2411
Website: https://www.fexle.com/blogs/agentexchange-an-ultimate-guide-for-salesforce-consultants-businesses/?utm_source=slideshare&utm_medium=pptNg
Discover why Wi-Fi 7 is set to transform wireless networking and how Router Architects is leading the way with next-gen router designs built for speed, reliability, and innovation.
Adobe Lightroom Classic Crack FREE Latest link 2025kashifyounis067
🌍📱👉COPY LINK & PASTE ON GOOGLE http://drfiles.net/ 👈🌍
Adobe Lightroom Classic is a desktop-based software application for editing and managing digital photos. It focuses on providing users with a powerful and comprehensive set of tools for organizing, editing, and processing their images on their computer. Unlike the newer Lightroom, which is cloud-based, Lightroom Classic stores photos locally on your computer and offers a more traditional workflow for professional photographers.
Here's a more detailed breakdown:
Key Features and Functions:
Organization:
Lightroom Classic provides robust tools for organizing your photos, including creating collections, using keywords, flags, and color labels.
Editing:
It offers a wide range of editing tools for making adjustments to color, tone, and more.
Processing:
Lightroom Classic can process RAW files, allowing for significant adjustments and fine-tuning of images.
Desktop-Focused:
The application is designed to be used on a computer, with the original photos stored locally on the hard drive.
Non-Destructive Editing:
Edits are applied to the original photos in a non-destructive way, meaning the original files remain untouched.
Key Differences from Lightroom (Cloud-Based):
Storage Location:
Lightroom Classic stores photos locally on your computer, while Lightroom stores them in the cloud.
Workflow:
Lightroom Classic is designed for a desktop workflow, while Lightroom is designed for a cloud-based workflow.
Connectivity:
Lightroom Classic can be used offline, while Lightroom requires an internet connection to sync and access photos.
Organization:
Lightroom Classic offers more advanced organization features like Collections and Keywords.
Who is it for?
Professional Photographers:
PCMag notes that Lightroom Classic is a popular choice among professional photographers who need the flexibility and control of a desktop-based application.
Users with Large Collections:
Those with extensive photo collections may prefer Lightroom Classic's local storage and robust organization features.
Users who prefer a traditional workflow:
Users who prefer a more traditional desktop workflow, with their original photos stored on their computer, will find Lightroom Classic a good fit.
How can one start with crypto wallet development.pptxlaravinson24
This presentation is a beginner-friendly guide to developing a crypto wallet from scratch. It covers essential concepts such as wallet types, blockchain integration, key management, and security best practices. Ideal for developers and tech enthusiasts looking to enter the world of Web3 and decentralized finance.
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfTechSoup
In this webinar we will dive into the essentials of generative AI, address key AI concerns, and demonstrate how nonprofits can benefit from using Microsoft’s AI assistant, Copilot, to achieve their goals.
This event series to help nonprofits obtain Copilot skills is made possible by generous support from Microsoft.
What You’ll Learn in Part 2:
Explore real-world nonprofit use cases and success stories.
Participate in live demonstrations and a hands-on activity to see how you can use Microsoft 365 Copilot in your own work!
Download Wondershare Filmora Crack [2025] With Latesttahirabibi60507
Copy & Past Link 👉👉
http://drfiles.net/
Wondershare Filmora is a video editing software and app designed for both beginners and experienced users. It's known for its user-friendly interface, drag-and-drop functionality, and a wide range of tools and features for creating and editing videos. Filmora is available on Windows, macOS, iOS (iPhone/iPad), and Android platforms.
Societal challenges of AI: biases, multilinguism and sustainabilityJordi Cabot
Towards a fairer, inclusive and sustainable AI that works for everybody.
Reviewing the state of the art on these challenges and what we're doing at LIST to test current LLMs and help you select the one that works best for you
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMaxim Salnikov
Imagine if apps could think, plan, and team up like humans. Welcome to the world of AI agents and agentic user interfaces (UI)! In this session, we'll explore how AI agents make decisions, collaborate with each other, and create more natural and powerful experiences for users.
2. € whoami
● Federico Razzoli
● Freelance consultant
● Writing SQL since MySQL 2.23
● [email protected]
● I love open source, sharing,
Collaboration, win-win, etc
● I love MariaDB, MySQL, Postgres, etc
○ Even Db2, somehow
4. Data versioning… why?
Several reasons:
● Auditing
● Travel back in time
○ Which / how many products were we selling in Dec 2016?
● Track a row’s history
○ History of the relationship with a customer
● Compare today’s situation with 6 month ago
○ How many EU employees did we lose because of Brexit?
● Statistics on data changes
○ Sales trends
● Find correlations
○ Sales decrease because we invest less in web marketing
5. Example
SELECT * FROM users WHERE id = 24 G
*************************** 1. row
id: 24
first_name: Jody
last_name: Whittaker
email: [email protected]
gender: F
birth_date: NULL
1 row in set (0.00 sec)
6. Method 1: track row versions
SELECT * FROM user_changes G
*************************** 1. row
id: 1
first_name: Jody
last_name: Whittaker
email: [email protected]
gender: F
valid_from: 2018-10-07
valid_to: NULL
1 row in set (0.00 sec)
7. Method 1: track row versions
What we can do (easily):
● Undo a column change
● Undo an UPDATE/DELETE
● Get the full state of a row at a given time
● See how often a row changes
Harder to do:
● Audit changes
● See how often a value changed over time
8. Method 2: track field changes
SELECT * FROM user_changes G
*************************** 1. row
id: 1
user_id: 24
field: email
old_value: [email protected]
new_value: [email protected]
valid_from: 2018-10-07
valid_to: NULL
1 row in set (0.00 sec)
9. Method 2: track field changes
What we can do (easily):
● Undo a column change
● Audit changes
● See how a certain value changed over time
Harder to do:
● Undo an UPDATE/DELETE
● Get/restore an old row version
● See how often a row changes over time
10. System-Versioned Tables
They automagically implement the Keep Row Changes method
● You INSERT, DELETE, UPDATE and SELECT data, getting the same
results you would get with a regular table
● Old versions of the rows are stored in the same (logical) table
● To get old data, you need to use a special syntaxes, like:
SELECT … AS OF TIMESTAMP '2018/01/01 16:30:00';
12. Where are sysver tables implemented?
In the proprietary DBMS world:
● Oracle 11g (2007)
● Db2 (2012)
● SQL Server 2016
Sometimes they are called Temporal Tables
In Db2, a temporal table can use system-period or application-period
13. Where are sysver tables implemented?
In the open source world:
● PostgreSQL, as an extension
● CockroachDB
● MariaDB 10.3
PostgreSQL and CockroachDB implementations have important
limitations
14. Where are sysver tables implemented?
In the NoSQL world:
● In HBase, rows have a version property
16. Overview
● Implemented in MariaDB 10.3 (stable since Apr 2017)
● You must have row-start and row-end Generated Columns
○ Type: TIMESTAMP(6) or DATETIME(6)
○ You decide the names
○ These are Invisible Columns (10.3 feature)
● Any storage engine
○ Except CONNECT (MDEV-15968)
17. ALTER TABLE
● Forbidden by default
○ Changes that only affect metadata also forbidden
○ system_versioning_alter_history='KEEP’
● ADD COLUMN adds a column that is set to the current DEFAULT value
or NULL for all old version rows
○ When was the column added?
● DROP COLUMN also affects old versions of the rows
○ The column’s history is lost
● CHANGE COLUMN also affects old versions of the rows
○ The column’s history is modified
18. Example
CREATE OR REPLACE TABLE employee (
...
valid_from TIMESTAMP(6)
GENERATED ALWAYS AS ROW START
COMMENT ‘When the row was INSERTed',
valid_to TIMESTAMP(6)
GENERATED ALWAYS AS ROW END
COMMENT 'When row was DELETEd or UPDATEd',
PERIOD FOR SYSTEM_TIME (valid_from, valid_to)
)
WITH SYSTEM VERSIONING,
ENGINE InnoDB;
19. Adding versioning to an existing table
ALTER TABLE employee
LOCK = SHARED,
ALGORITHM = COPY,
ADD COLUMN valid_from TIMESTAMP(6) GENERATED ALWAYS AS ROW START,
ADD COLUMN valid_to TIMESTAMP(6) GENERATED ALWAYS AS ROW END,
ADD PERIOD FOR SYSTEM_TIME(valid_from, valid_to),
ADD SYSTEM VERSIONING
;
● Notice ALGORITHM=COPY and LOCK=SHARED
20. Querying historical data: point in time
SELECT * FROM my_table FOR SYSTEM_TIME
● AS OF TIMESTAMP'2018-10-01 12:00:00'
● FROM '2018-10-01 00:00:00' TO '2018-11-01 00:00:00'
● BETWEEN (NOW() - INTERVAL 1 YEAR) AND NOW() ALL
SELECT * FROM my_table FOR SYSTEM_TIME ALL
WHERE valid_from < @end AND valid_to > @start;
21. Querying historical data: point in time
SELECT * FROM my_table FOR SYSTEM_TIME
● AS OF TIMESTAMP'2018-10-01 12:00:00'
● AS OF (SELECT valid_from FROM employee WHERE id=50)
● AS OF @some_event_timestamp
22. Querying historical data: time range
SELECT * FROM my_table FOR SYSTEM_TIME
● FROM '2018-10-01 00:00:00' TO '2018-11-01 00:00:00'
● FROM (SELECT ...) TO (SELECT ...)
● FROM @some_event TO @another_event
23. Querying historical data: time range
SELECT * FROM my_table FOR SYSTEM_TIME
● BETWEEN '2018-10-01 00:00:00' AND '2018-11-01 00:00:00'
● BETWEEN (NOW() - INTERVAL 1 YEAR) AND NOW()
● BETWEEN @some_event AND (SELECT ...)
24. Querying historical data: example
INSERT INTO customer (id, first_name, last_name, email) VALUES
(1, 'William', 'Hartnell', '[email protected]'),
(2, 'Tom', 'Baker', '[email protected]');
SET @beginning_of_time := NOW(6);
DELETE FROM customer WHERE id = 1;
UPDATE customer SET email = '[email protected]' WHERE id=2;
INSERT INTO customer (id, first_name, last_name, email) VALUES
(3, 'Peter', 'Capaldi', '[email protected]');
SET @twelve_regeneration := NOW(6);
INSERT INTO customer (id, first_name, last_name, email) VALUES
(4, 'Jody', 'Wittaker', '[email protected]');
25. Querying historical data: example
SELECT id, first_name, last_name, valid_from, valid_to
FROM customer
FOR SYSTEM_TIME
BETWEEN @beginning_of_time AND @twelve_regeneration;
+----+------------+-----------+----------------------------+----------------------------+
| id | first_name | last_name | valid_from | valid_to |
+----+------------+-----------+----------------------------+----------------------------+
| 1 | William | Hartnell | 2018-11-04 13:50:33.627753 | 2018-11-04 13:50:33.633414 |
| 2 | Tom | Baker | 2018-11-04 13:50:33.627753 | 2018-11-04 13:50:33.638419 |
| 2 | Tom | Baker | 2018-11-04 13:50:33.638419 | 2038-01-19 03:14:07.999999 |
| 3 | Peter | Capaldi | 2018-11-04 13:50:33.644880 | 2038-01-19 03:14:07.999999 |
+----+------------+-----------+----------------------------+----------------------------+
26. Partitions
● By default, the history is stored together with current data
● You can put the history on separate partitions
● And limit them:
○ By rows number
○ By time
27. Indexes
● The ROW END column is appended to UNIQUE indexes and the PK
● Other indexes are untouched
○ You may consider adding ROW END to some of your indexes
○ This is a good reason to define temporal columns explicitly
29. Basic Examples
● First examples take advantage of temporal columns to identify INSERTs,
DELETEs and UPDATEs
30. Get DELETEd rows
● Get canceled orders:
SET @eot := '2038-01-19 03:14:07.999999';
SELECT * FROM `order` FOR SYSTEM_TIME ALL
WHERE valid_to < @eot;
● Get orders canceled today:
SELECT COUNT(*)
FROM `order` FOR SYSTEM_TIME
WHERE valid_to = @
AND valid_from
DATE(NOW()) AND (DATE(NOW()) + INTERVAL 1 DAY);
31. Get INSERTed rows
● Get orders generated today:
SELECT id, MIN(valid_from) AS insert_time
FROM `order` FOR SYSTEM_TIME ALL
GROUP BY id
HAVING DATE(MIN(valid_from)) = DATE(NOW())
ORDER BY MIN(valid_from);
32. Get UPDATEd rows
● How many times orders were modified:
SELECT
-- exclude the INSERTions
id, (COUNT(*) – 1) AS how_many_edits
FROM `order` FOR SYSTEM_TIME ALL
-- exclude DELETions
WHERE valid_to < @eot
GROUP BY id
ORDER BY how_many_edits;
33. Debug mistakes in a single row
● Wrong data has been found in a row. The original version of the row was
correct, so we want to know when the mistake (or malicious change)
happened
34. Debug mistakes in a single row
● Find all versions of a row:
SELECT id, status, valid_from, valid_to
FROM `order` FOR SYSTEM_TIME ALL
WHERE id = 24;
35. Debug mistakes in a single row
● When an order was blocked:
SELECT DATE(MIN(valid_from)) AS block_date
FROM `order` FOR SYSTEM_TIME ALL
WHERE status = 'BLOCKED'
AND id = 24;
36. Debug mistakes in a single row
● Status is wrong. To find out how the problem happened, we want to check the
INSERT and all following status changes:
SELECT id, status, valid_from, valid_to
FROM (
SELECT
NOT (status <=> @prev_status) AS status_changed,
@prev_status := status,
id, status, valid_from, valid_to
FROM `order` FOR SYSTEM_TIME ALL
WHERE id = 24
) t
WHERE status_changed = 1;
37. Debug mistakes in a single row
● We want to know if the status is the same as one month ago:
SELECT
present.id,
present.status AS current_status,
past.status AS past_status
FROM `order` present
INNER JOIN `order`
FOR SYSTEM_TIME AS OF TIMESTAMP
NOW() - INTERVAL 1 MONTH
AS past
ON present.id = past.id
ORDER BY present.id;
38. Stats on data changes
SELECT
AVG(amount), STDDEV(amount),
MAX(amount), MIN(amount),
COUNT(amount)
FROM account FOR SYSTEM_TIME ALL
WHERE customer_id = 24
AND valid_from BETWEEN '2016-00-00' AND NOW()
GROUP BY customer_id;