The Random Query Generator The Colonoscopy of Database Software Jim Starkey Philip Stoev MySQL SystemQA Team

Slides:



Advertisements
Similar presentations
Presented by, MySQL & OReilly Media, Inc. MySQL 6.0 Backup Dr. Lars Thalmann Dr. Charles A. Bell Rafal Somla Replication and Backup Team.
Advertisements

Phoenix We put the SQL back in NoSQL James Taylor Demos:
EIONET Training Beginners Zope Course Miruna Bădescu Finsiel Romania Copenhagen, 27 October 2003.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
1 1999/Ph 514: Channel Access Concepts EPICS Channel Access Concepts Bob Dalesio LANL.
Data Bits Sets Trans- actions Specials Domains Normalization $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 Final DataBit.
Drop in replacement of MySQL. Agenda MySQL branch GPL licence Maria storage engine Virtual columns FederatedX storage engine PBXT storage engine XtraDB.
6 SQL Server Integration Same manageability, administration & development experience Integrated queries & transactions Integrated HA and backup/restore.
A comparison of MySQL And Oracle Jeremy Haubrich.
ActiveXperts Network Monitor Monitors servers, workstations and devices for availability Alerts and corrects.
Cacti Workshop Tony Roman Agenda What is Cacti? The Origins of Cacti Large Installation Considerations Automation The Current.
CSE 190: Internet E-Commerce Lecture 10: Data Tier.
Living in a Digital World Discovering Computers 2010.
TRANSACTIONS. Definition One or more SQL statements that operate as a single unit. Each statement in the unit is completely interdependent. If one statement.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Chapter 9 Database Management
Module 13 Automating SQL Server 2008 R2 Management.
Oracle Developer Tools for Visual Studio.NET Curtis Rempe.
Students: Nadia Goshmir, Yulia Koretsky Supervisor: Shai Rozenrauch Industrial Project Advanced Tool for Automatic Testing Final Presentation.
Managing Multi-User Databases AIMS 3710 R. Nakatsu.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 13 Managing Databases with SQL Server 2000.
Overview of SQL Server Alka Arora.
1. When things go wrong: how to find SQL error Sveta Smirnova Principle Technical Support Engineer, Oracle.
PostgreSQL and relational databases As well as assignment 4…
I Copyright © 2004, Oracle. All rights reserved. Introduction.
Database Technical Session By: Prof. Adarsh Patel.
Information Systems Today (©2006 Prentice Hall) MySQL 1CS3754 Class Note #8, Is an open-source relational database management system 2.Is fast and.
Relational Database Management Systems. A set of programs to manage one or more databases Provides means for: Accessing the data Inserting, updating and.
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
MySQL. Dept. of Computing Science, University of Aberdeen2 In this lecture you will learn The main subsystems in MySQL architecture The different storage.
PostgreSQL and relational databases As well as assignment 4…
OpenACS: Porting Oracle Applications to PostgreSQL Ben Adida
1099 Why Use InterBase? Bill Todd The Database Group, Inc.
1cs Intersection of Concurrent Accesses A fundamental property of Web sites: Concurrent accesses by multiple users Concurrent accesses intersect.
1 Copyright © 2004, Oracle. All rights reserved. Introduction.
Transaction processing Book, chapter 6.6. Problem: With a single user…. you run a query, you get the results, you run the next, etc. But database life.
1 CS 430 Database Theory Winter 2005 Lecture 16: Inside a DBMS.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Massive Stochastic Testing of SQL Don Slutz Microsoft Research Presented By Manan Shah.
Developing software and hardware in parallel Vladimir Rubanov ISP RAS.
Normalizing Database Files Professor Ralph Westfall May, 2011.
What is MySQL? MySQL is a relational database management system (RDBMS) based on SQL (Structured Query Language). First released in January, Many.
10 1 Chapter 10 - A Transaction Management Database Systems: Design, Implementation, and Management, Rob and Coronel.
Technology Drill Down: Windows Azure Platform Eric Nelson | ISV Application Architect | Microsoft UK |
Database Overview What is a database? What types of databases are there? How are databases more powerful than spreadsheets?
CMPE 226 Database Systems April 19 Class Meeting Department of Computer Engineering San Jose State University Spring 2016 Instructor: Ron Mak
Physical Layer of a Repository. March 6, 2009 Agenda – What is a Repository? –What is meant by Physical Layer? –Data Source, Connection Pool, Tables and.
Introduction to MySQL  Working with MySQL and MySQL Workbench.
uses of DB systems DB environment DB structure Codd’s rules current common RDBMs implementations.
© SCRIBE SOFTWARE CORPORATION 2008 Tips and Tricks for Working with Scribe Insight Trace Files.
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
Session Name Pelin ATICI SQL Premier Field Engineer.
The Holmes Platform and Applications
Effective T-SQL Solutions
In-Memory Capabilities
Managing Multi-User Databases
Introduction to Web programming
New Foreign Keys in 6.1 Konstantin Osipov, Staff Engineer, MYSQL
1Z0-320 Dumps
1Z0-888 Oracle - VCE Questions
Super Scaling The LMAX Queue Pattern.
Transactions Properties.
Batches, Transactions, & Errors
The PROCESS of Queries John Deardurff
Chapter 10 – Software Testing
In-Memory OLTP for Database Developers
The PROCESS of Queries John Deardurff
Batches, Transactions, & Errors
Productive + Hybrid + Intelligent + Trusted
Presentation transcript:

The Random Query Generator The Colonoscopy of Database Software Jim Starkey Philip Stoev MySQL SystemQA Team

Testing Coverage [Slutz, 1998] All Possible SQL Statements and States Customer Usage Scenarios BUGS Tests

What is it? The Random Query Generator: Generates (pseudo-)random data Executes targeted (pseudo-)random queries Validates query results and monitors server status Reports crashes and other deviations

Features Multi-platform - supports Linux, Solaris, Windows (native) Fully automatic - integrated monitoring for unattended runs - provides pass/fail indication via exit() code and XML Highly customizable - tests all types of queries, tables and fields - plug-in components for validating the result Repeatable runs - for non-concurrent tests

The SQL Grammar Describes the queries to generate, YACC-style: query: SELECT _field FROM _table where LIMIT _digit | UPDATE _table SET _field = _digit where ; where: WHERE _field > _digit | WHERE _field IS NULL ; Provides convenience functions _field, _table, _digit, etc. Supports Embedded Perl

Query Generation 1.Walk the grammar tree and selectively take one of the branches at each fork in the road 2.Once a sequence of tokens has been obtained, replace each with an appropriate value query: select: SELECT_fieldFROM_table where: WHERE_field> _digit SELECT`f1`FROM`t1` WHERE`f2`> 9

Sample Generated Query SELECT SUM(DISTINCT OUTR. `varchar_nokey` ) AS X FROM C AS OUTR WHERE OUTR. `pk` IN ( SELECT INNR. `pk` AS Y FROM BB AS INNR2 LEFT JOIN BB AS INNR ON (INNR2.`datetime_nokey` > INNR.`time_nokey`) WHERE INNR. `int_nokey` > INNR. `int_nokey` AND OUTR. `time_key` 1 HAVING X <> '18:18:19 ORDER BY OUTR. `varchar_nokey`, OUTR. `pk`;

Testing home 1.Describe the data you wish to operate on 2.Describe the SQL queries that you will be running in a grammar 3.Run a synthetic workload and monitor server behavior and performance

Testing storage engines Compare query results with a reference storage engine (MyISAM or InnoDB) Ready tests for transactional integrity - Atomicity, Isolation and Consistency - REPEATABLE READ - Durability and recovery Stress testing across a wide range of: - engine configurations - row counts - field sizes - composition of the workload

Testing Recovery Recovery testing is performed at the end of every test - recovery is tested for free every time 1.Kill the server (with kill -9) - or kill at important code points via instrumentation - more sadistic methods forthcoming, e.g. a power cut 2.Restart the server or restore from snapshot/backup 3.Validate the data - verify that the last transactions were durable - check that the database remains consistent - walk the tables back and forth using different methods - issue CHECK/ANALYZE/OPTIMIZE/REPAIR

Questions? Philip Stoev Contact: Code: Documentation: