This document discusses functional database strategies, specifically focusing on immutable rows, window functions, event-sourcing, and database interactions from a functional perspective. The key points covered include:
1. Making database rows immutable by storing them as a log of changes rather than allowing in-place updates. This allows reconstructing the full history.
2. Using window functions to partition and aggregate over row groups to enable querying the latest or historical state.
3. Storing a log of events rather than the current application state, in line with event-sourcing principles.
4. Techniques for interacting with databases in a functional way, including restricting mutations and optimizing data structures.
Functional Database Strategies at Scala BayJason Swartz
油
As developers using a functional programming language, we embrace immutable collections and pure functions in our code. However, we often have separate rules for how we work with our persistent collections in databases. In this talk we'll look at why & how to take a more functional approach to persistence with databases, from managing the connections, using immutable table rows, and considering event-source persistence
Big-Data-Analysen mit MariaDB ColumnStoreMariaDB plc
油
MariaDB ColumnStore is an open source distributed data warehouse that provides fast, efficient queries for big data analytics using a massively parallel processing architecture. It stores data in columns rather than rows to improve compression and allow filtering and aggregation of specific columns for analytical queries. ColumnStore allows for both transactional and analytical workloads on the same database using a single SQL interface and is easy to manage, scale and deploy on-premises or in the cloud.
Modern query optimisation features in MySQL 8.Mydbops
油
MySQL 8 (a huge leap forward), indexing capabilities, execution plan enhancements, optimizer improvements, and many other current query tweak features are covered in the slides.
Just about anyone can write a basic SQL query for a table. Not everyone can write a good query though - that takes practice and knowing how to understand what the optimizer is doing with the query. Learn the basics of query optimization so you keep your application engaging the user rather then showing the progress bar as they wait on the database.
The document discusses window functions in MariaDB. It begins with an overview and plan, then covers basic window functions like row_number(), rank(), dense_rank(), and ntile(). It discusses frames for window functions, including examples using RANGE frames. It provides examples of problems that can be solved using window functions, such as smoothing noisy data, generating account balance statements, and finding sequences with no missing numbers ("islands").
Microservices Tutorial Session at JavaOne 2016Jason Swartz
油
1. The document provides an overview of microservices including definitions, properties, and considerations when designing and developing microservice applications. Key topics covered include splitting monolithic applications into smaller services, asynchronous communication between services, deployment strategies like Docker, and data modeling with immutable tables.
2. The presentation discusses the benefits of microservices including improved scalability and maintainability compared to monolithic applications, but also notes challenges like increased complexity from splitting functionality across services.
3. Examples are provided throughout to illustrate concepts like modeling state changes as a log of immutable records rather than mutable rows, and using event sourcing to reconstruct current application data from a sequence of events.
The document discusses window functions in SQL and how they allow users to access and aggregate over multiple rows of a result set, unlike regular functions which provide a single result per row. It provides examples of using window functions like row_number() and avg() to number rows, calculate averages over a window of rows, and explains how window frames define the range of rows included in the calculation. Overall, the document serves as an introduction to window functions and how they enable more powerful row-by-row calculations compared to regular functions.
New optimizer features in MariaDB releases before 10.12Sergey Petrunya
油
The document discusses new optimizer features in recent and upcoming MariaDB releases. MariaDB 10.8 introduced JSON histograms and support for reverse-ordered indexes. JSON produced by the optimizer is now valid and processible. MariaDB 10.9 added SHOW EXPLAIN FORMAT=JSON and SHOW ANALYZE can return partial results. MariaDB 10.10 enabled table elimination for derived tables and improved optimization of many-table joins. Future releases will optimize queries on stored procedures and show optimizer timing in EXPLAIN FORMAT=JSON.
This document provides an introduction to using EXPLAIN to analyze MySQL queries. It begins with background on MySQL and the objectives of learning to use EXPLAIN. It then covers the syntax of EXPLAIN, the output it provides, and what each column in the output means. The document concludes with brief discussions on indexing techniques and query optimization.
This document discusses using Google BigQuery for big data analysis. It provides an overview of BigQuery's features like fast querying of large datasets using SQL, low costs, and offline job support. It also includes steps for getting started with BigQuery, including loading sample data, querying data through the web UI or command line, and programming with BigQuery through Node.js and Google Apps Script. Links to documentation and pricing are also referenced.
This short talk will be about an incident that kept DBAs working on a weekend. Two bugs, one in our application code and one in the database, joined force and almost brought down Booking.com. And this occurred at one of the worst possible times. Curious about what happened: come to this talk to learn more.
The document discusses optimizing MySQL/MariaDB query performance through optimizer tuning. It explains that the query optimizer plays a key role in database performance by determining the most efficient query execution plan. Tuning the optimizer can help address performance issues caused by it generating a suboptimal plan. The document provides tips on identifying optimizer-related problems and troubleshooting queries, from examining slow query logs and status variables to testing different index configurations.
MySQL 5.7 Tutorial Dutch PHP Conference 2015Dave Stokes
油
MySQL 5.7 is the latest version of the MySQL database. It includes new features such as support for JSON as a native data type with functions for manipulating JSON documents. Security has also been improved with secure defaults, password rotation/expiration controls, and SSL encryption enabled by default for the C client library. The release candidate for 5.7 was released in April 2015 and includes patches, contributions, and enhancements over previous versions.
MySQL 5.7. Tutorial - Dutch PHP Conference 2015Dave Stokes
油
MySQL 5.7 is the latest version of the MySQL database. It includes new features such as support for JSON as a native data type with functions for manipulating JSON documents. Security has also been improved with secure defaults, password rotation/expiration controls, and SSL encryption enabled by default for the C client library. The release candidate for 5.7 was released in April 2015 and includes patches, contributions, and enhancements over previous versions.
Google BigQuery is a big data analytics service that allows users to analyze petabytes of data using SQL queries. It offers features like fast query response times, SQL-like queries, multi-dataset support, and pay-as-you-go pricing. The document provides an overview of BigQuery and demonstrates how to import and query data from the BigQuery web UI, command line, and programmatically using Node.js and Google Apps Script.
Applied Partitioning And Scaling Your Database System PresentationRichard Crowley
油
This document discusses applying partitioning to MySQL OLTP applications. It begins by reviewing classic uses of partitioning in data warehousing applications. It then explains how partitioning can benefit OLTP workloads by reducing seek and scan set sizes and limiting transaction durations. The document provides an example of applying hash partitioning to tables in a retail store application based on store ID. It demonstrates how to expand and merge partitions as stores are added or closed. Performance tests on the partitioned tables show improvements in query times compared to non-partitioned tables. In summary, the document argues that partitioning provides a way to scale MySQL databases for OLTP workloads while reducing maintenance costs.
MariaDB: Engine Independent Table Statistics, including histogramsSergey Petrunya
油
EITS (Engine Independent Table Statistics) provides new statistics for MariaDB query optimization, including histograms for column value distributions. These statistics must be manually collected with ANALYZE TABLE and enabled to improve estimates for queries using non-indexed columns and ranges. With EITS, the optimizer can better estimate row counts and filtering for joins and WHERE clauses.
Beyond php - it's not (just) about the codeWim Godden
油
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
The document discusses MySQL data manipulation commands. It provides examples of using SELECT statements to retrieve data from tables based on specified criteria, INSERT statements to add new data to tables, UPDATE statements to modify existing data in tables, and the basic syntax for these commands. It also reviews naming conventions and some best practices for working with tables in MySQL.
How to Avoid Pitfalls in Schema Upgrade with GaleraSveta Smirnova
油
This document discusses different methods for performing schema upgrades in a Galera cluster, including Total Order Isolation (TOI), Rolling Schema Upgrade (RSU), and the pt-online-schema-change tool. TOI blocks the entire cluster during DDL but ensures consistency, while RSU allows upgrades without blocking the cluster but requires stopping writes and carries risks of inconsistency. Pt-online-schema-change performs non-blocking upgrades using triggers to copy rows to a new table in chunks.
This document provides an overview of MySQL including its architecture, clients, connection layer, SQL layer, storage engines, and installation methods. Key points include:
- MySQL uses a connection thread pool, query cache, parser, optimizer, and various storage engines like InnoDB and MyISAM.
- Common MySQL clients allow executing queries, administering the server, checking tables, backing up data, and more.
- The connection layer handles authentication and the communication protocol.
- The SQL layer performs parsing, optimization, and determining the optimal execution plan.
- Storage engines like InnoDB and MyISAM support different features and have different performance characteristics for storage, indexing, and more.
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 theyre 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.
High Performance Serverless Functions in ScalaJason Swartz
油
High Performance Serverless Functions in Scala
with AWS Lambda
Learn how to build serverless functions in Scala with low response times and overall high performance.
Everyone's Guide to States, Events and Async-Messaging for MicroservicesJason Swartz
油
We're hitting all the buzzwords! In this talk we'll look at why & how to use append-only states and event-sourcing to introduce immutability to your regular db's tables. We'll also discuss asynchronous, non-blocking microservices and examine some of the more straightforward solutions for building them. If you're looking for a complex architecture guide, this ain't it. It's microservice event-sourcing and async message for the 99%.
Microservices Tutorial Session at JavaOne 2016Jason Swartz
油
1. The document provides an overview of microservices including definitions, properties, and considerations when designing and developing microservice applications. Key topics covered include splitting monolithic applications into smaller services, asynchronous communication between services, deployment strategies like Docker, and data modeling with immutable tables.
2. The presentation discusses the benefits of microservices including improved scalability and maintainability compared to monolithic applications, but also notes challenges like increased complexity from splitting functionality across services.
3. Examples are provided throughout to illustrate concepts like modeling state changes as a log of immutable records rather than mutable rows, and using event sourcing to reconstruct current application data from a sequence of events.
The document discusses window functions in SQL and how they allow users to access and aggregate over multiple rows of a result set, unlike regular functions which provide a single result per row. It provides examples of using window functions like row_number() and avg() to number rows, calculate averages over a window of rows, and explains how window frames define the range of rows included in the calculation. Overall, the document serves as an introduction to window functions and how they enable more powerful row-by-row calculations compared to regular functions.
New optimizer features in MariaDB releases before 10.12Sergey Petrunya
油
The document discusses new optimizer features in recent and upcoming MariaDB releases. MariaDB 10.8 introduced JSON histograms and support for reverse-ordered indexes. JSON produced by the optimizer is now valid and processible. MariaDB 10.9 added SHOW EXPLAIN FORMAT=JSON and SHOW ANALYZE can return partial results. MariaDB 10.10 enabled table elimination for derived tables and improved optimization of many-table joins. Future releases will optimize queries on stored procedures and show optimizer timing in EXPLAIN FORMAT=JSON.
This document provides an introduction to using EXPLAIN to analyze MySQL queries. It begins with background on MySQL and the objectives of learning to use EXPLAIN. It then covers the syntax of EXPLAIN, the output it provides, and what each column in the output means. The document concludes with brief discussions on indexing techniques and query optimization.
This document discusses using Google BigQuery for big data analysis. It provides an overview of BigQuery's features like fast querying of large datasets using SQL, low costs, and offline job support. It also includes steps for getting started with BigQuery, including loading sample data, querying data through the web UI or command line, and programming with BigQuery through Node.js and Google Apps Script. Links to documentation and pricing are also referenced.
This short talk will be about an incident that kept DBAs working on a weekend. Two bugs, one in our application code and one in the database, joined force and almost brought down Booking.com. And this occurred at one of the worst possible times. Curious about what happened: come to this talk to learn more.
The document discusses optimizing MySQL/MariaDB query performance through optimizer tuning. It explains that the query optimizer plays a key role in database performance by determining the most efficient query execution plan. Tuning the optimizer can help address performance issues caused by it generating a suboptimal plan. The document provides tips on identifying optimizer-related problems and troubleshooting queries, from examining slow query logs and status variables to testing different index configurations.
MySQL 5.7 Tutorial Dutch PHP Conference 2015Dave Stokes
油
MySQL 5.7 is the latest version of the MySQL database. It includes new features such as support for JSON as a native data type with functions for manipulating JSON documents. Security has also been improved with secure defaults, password rotation/expiration controls, and SSL encryption enabled by default for the C client library. The release candidate for 5.7 was released in April 2015 and includes patches, contributions, and enhancements over previous versions.
MySQL 5.7. Tutorial - Dutch PHP Conference 2015Dave Stokes
油
MySQL 5.7 is the latest version of the MySQL database. It includes new features such as support for JSON as a native data type with functions for manipulating JSON documents. Security has also been improved with secure defaults, password rotation/expiration controls, and SSL encryption enabled by default for the C client library. The release candidate for 5.7 was released in April 2015 and includes patches, contributions, and enhancements over previous versions.
Google BigQuery is a big data analytics service that allows users to analyze petabytes of data using SQL queries. It offers features like fast query response times, SQL-like queries, multi-dataset support, and pay-as-you-go pricing. The document provides an overview of BigQuery and demonstrates how to import and query data from the BigQuery web UI, command line, and programmatically using Node.js and Google Apps Script.
Applied Partitioning And Scaling Your Database System PresentationRichard Crowley
油
This document discusses applying partitioning to MySQL OLTP applications. It begins by reviewing classic uses of partitioning in data warehousing applications. It then explains how partitioning can benefit OLTP workloads by reducing seek and scan set sizes and limiting transaction durations. The document provides an example of applying hash partitioning to tables in a retail store application based on store ID. It demonstrates how to expand and merge partitions as stores are added or closed. Performance tests on the partitioned tables show improvements in query times compared to non-partitioned tables. In summary, the document argues that partitioning provides a way to scale MySQL databases for OLTP workloads while reducing maintenance costs.
MariaDB: Engine Independent Table Statistics, including histogramsSergey Petrunya
油
EITS (Engine Independent Table Statistics) provides new statistics for MariaDB query optimization, including histograms for column value distributions. These statistics must be manually collected with ANALYZE TABLE and enabled to improve estimates for queries using non-indexed columns and ranges. With EITS, the optimizer can better estimate row counts and filtering for joins and WHERE clauses.
Beyond php - it's not (just) about the codeWim Godden
油
Most PHP developers focus on writing code. But creating Web applications is about much more than just wrting PHP. Take a step outside the PHP cocoon and into the big PHP ecosphere to find out how small code changes can make a world of difference on servers and network. This talk is an eye-opener for developers who spend over 80% of their time coding, debugging and testing.
The document discusses MySQL data manipulation commands. It provides examples of using SELECT statements to retrieve data from tables based on specified criteria, INSERT statements to add new data to tables, UPDATE statements to modify existing data in tables, and the basic syntax for these commands. It also reviews naming conventions and some best practices for working with tables in MySQL.
How to Avoid Pitfalls in Schema Upgrade with GaleraSveta Smirnova
油
This document discusses different methods for performing schema upgrades in a Galera cluster, including Total Order Isolation (TOI), Rolling Schema Upgrade (RSU), and the pt-online-schema-change tool. TOI blocks the entire cluster during DDL but ensures consistency, while RSU allows upgrades without blocking the cluster but requires stopping writes and carries risks of inconsistency. Pt-online-schema-change performs non-blocking upgrades using triggers to copy rows to a new table in chunks.
This document provides an overview of MySQL including its architecture, clients, connection layer, SQL layer, storage engines, and installation methods. Key points include:
- MySQL uses a connection thread pool, query cache, parser, optimizer, and various storage engines like InnoDB and MyISAM.
- Common MySQL clients allow executing queries, administering the server, checking tables, backing up data, and more.
- The connection layer handles authentication and the communication protocol.
- The SQL layer performs parsing, optimization, and determining the optimal execution plan.
- Storage engines like InnoDB and MyISAM support different features and have different performance characteristics for storage, indexing, and more.
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 theyre 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.
High Performance Serverless Functions in ScalaJason Swartz
油
High Performance Serverless Functions in Scala
with AWS Lambda
Learn how to build serverless functions in Scala with low response times and overall high performance.
Everyone's Guide to States, Events and Async-Messaging for MicroservicesJason Swartz
油
We're hitting all the buzzwords! In this talk we'll look at why & how to use append-only states and event-sourcing to introduce immutability to your regular db's tables. We'll also discuss asynchronous, non-blocking microservices and examine some of the more straightforward solutions for building them. If you're looking for a complex architecture guide, this ain't it. It's microservice event-sourcing and async message for the 99%.
Everyone's guide to event sourcing and async-messagingJason Swartz
油
We're hitting all the buzzwords! In this talk we'll look at why & how to use event-sourcing to introduce immutability to your regular db's tables. We'll also discuss asynchronous, non-blocking microservices and examine some of the more straightforward solutions for building them. If you're looking for a complex architecture guide, this ain't it. It's microservice event-sourcing and async message for the 99%.
Enterprise APIs With Ease - Scala Developers of BarcelonaJason Swartz
油
A talk about REST API architecture, the Scala language, the Netflix deployment platform and our own successful development model.
Our REST API server project at Netflix was a big success, resulting in 150 web services in five months and no downtime. By taking advantage of self-documenting API frameworks, continuous integration with JSON-friendly API tests and automated deployments, we were able to focus on building services that would publicize themselves. This session highlights the engineering tools and processes that enable rapid API development, deployment and adoption. I'll cover the Scalatra, Swagger, and ScalaTest frameworks as well as Netflix's push-button deployment system using Jenkins and Asgard.
Build Enterprise APIs WIth Ease (And Scala)Jason Swartz
油
How to build enterprise REST API's with ease, with examples and source in Scala. From the September 9th, 2014 talk for the Scala Bay meetup group at Netflix in Los Gatos, CA
The document discusses the benefits of exercise for both physical and mental health. Regular exercise can help reduce the risk of diseases like heart disease and diabetes, and it can also improve mood and reduce stress and anxiety levels. Exercising for at least 30 minutes per day several times a week is recommended to gain these health benefits.
Self-Compacting Concrete: Composition, Properties, and Applications in Modern...NIT SILCHAR
油
Self-Compacting Concrete (SCC) is a high-performance material that flows under its own weight, eliminating the need for vibration. It offers superior workability, durability, and structural efficiency, making it ideal for complex designs, congested reinforcement, and sustainable construction practices.
"Introduction to VLSI Design: Concepts and Applications"GtxDriver
油
This document offers a detailed exploration of VLSI (Very Large-Scale Integration) design principles, techniques, and applications. Topics include transistor-level design, digital circuit integration, and optimization strategies for modern electronics. Ideal for students, researchers, and professionals seeking a comprehensive guide to VLSI technology.
he Wright brothers, Orville and Wilbur, invented and flew the first successfu...HardeepZinta2
油
The Wright brothers, Orville and Wilbur, invented and flew the first successful airplane in 1903. Their flight took place in Kitty Hawk, North Carolina.
REVOLUTIONIZING LEAD QUALIFICATION: THE POWER OF LLMS OVER TRADITIONAL METHODSgerogepatton
油
This paper examines the potential of Large Language Models (LLMs) in revolutionizing lead
qualification processes within sales and marketing. We critically analyze the limitations of traditional
methods, such as dynamic branching and decision trees, during the lead qualification phase. To address
these challenges, we propose a novel approach leveraging LLMs. Two methodologies are presented: a
single-phase approach using one comprehensive prompt and a multi-phase approach employing discrete
prompts for different stages of lead qualification. The paper highlights the advantages, limitations, and
potential business implementation of these LLM-driven approaches, along with ethical considerations,
demonstrating their flexibility, maintenance requirements, and accuracy in lead qualification.
A measles outbreak originating in West Texas has been linked to confirmed cases in New Mexico, with additional cases reported in Oklahoma and Kansas. 58 individuals have required hospitalization, and 3 deaths, 2 children in Texas and 1 adult in New Mexico. These fatalities mark the first measles-related deaths in the United States since 2015 and the first pediatric measles death since 2003. The YSPH The Virtual Medical Operations Center Briefs (VMOC) were created as a service-learning project by faculty and graduate students at the Yale School of Public Health in response to the 2010 Haiti Earthquake. Each year, the VMOC Briefs are produced by students enrolled in Environmental Health Science Course 581 - Public Health Emergencies: Disaster Planning and Response. These briefs compile diverse information sources including status reports, maps, news articles, and web content into a single, easily digestible document that can be widely shared and used interactively. Key features of this report include:
- Comprehensive Overview: Provides situation updates, maps, relevant news, and web resources.
- Accessibility: Designed for easy reading, wide distribution, and interactive use.
- Collaboration: The unlocked" format enables other responders to share, copy, and adapt it seamlessly.
The students learn by doing, quickly discovering how and where to find critical information and presenting it in an easily understood manner.
Reinventando el CD_ Unificando Aplicaciones e Infraestructura con Crossplane-...Alberto Lorenzo
油
En esta charla, exploraremos c坦mo Crossplane puede transformar la forma en que gestionamos despliegues, yendo m叩s all叩 de un simple IaC para convertirse en una potente herramienta de Continuous Deployment (CD).
Aprenderemos que es Crossplane
Como usar Crossplane como IaC pero sobretodo Deployment as Code de manera eficiente
Unificar la gesti坦n de aplicaciones e infraestructura de forma nativa en Kubernetes
52. with latest_issues as (
select *, row_number() over (
partition by issue_id
order by id
desc
)
from issues where created > now() - interval '7 day'
)
select * from latest_issues where row_number = 1
53. with latest_issues as (
select *, row_number() over (
partition by issue_id
order by id
desc
)
from issues where created > now() - interval '7 day'
)
select * from latest_issues where row_number = 1
54. with latest_issues as (
select *, row_number() over (
partition by issue_id
order by id
desc
)
from issues where created > now() - interval '7 day'
)
select * from latest_issues where row_number = 1
55. with latest_issues as (
select *, row_number() over (
partition by issue_id
order by id
desc
)
from issues where created > now() - interval '7 day'
)
select * from latest_issues where row_number = 1
83. 1. Frankly, Its Weird
2. Requires Events. No Events, No Event-Sourcing.
3. As Of November 2016, Its Still Non-Standard
Reasons Against Event-Sourcing
91. Avoid shared mutable SESSIONS
Avoid shared mutable CURSORS
Mutating state? Cool! But MODEL IT FIRST
Execute state changes at THE EDGE
Safe Database Interactions