From SQL to NDB API and the MySQL Cluster Data Nodes and Back Again

Stewart Smith (Percona), Monty Taylor (HP)

Understanding MySQL Cluster query execution while converting SQL to NDB API. In this session we will start with two SQL queries (a key lookup and a join) and follow them through to what NDB API code is run by the MySQL Server, what we’d write if we were being optimal (NDB API in C++/Java) and then how the MySQL Cluster Data Nodes execute this code.

Come to this talk if: - you’re interested in using MySQL Cluster through the NDB API OR - you’re interested in how MySQL Cluster executes queries OR - you’re interested in NDB API Connectors

You’re expected to: - not be scared of SQL (much) - Be okay with seeing C++ and/or Java code

s/Java/$LANGUAGE_OF_CHOICE/ as the NDB API Connectors are awesome.

OUTLINE: – Pkey lookup SQL: CREATE TABLE t1 (pk int PRIMARY KEY, v VARCHAR) ENGINE=NDB; INSERT INTO t1 values (?,?); SELECT v FROM t1 WHERE pk=1; NDB API: Transaction/Operation intro NDB KERNEL: Where signals go (and come from) When data is sent/received from kernel Performance: NDBAPI (C++) versus NDBAPI (Java). API versus SQL.

- (Simple) Join
       SQL:
               select b.name, f.insult from bstrd b, fckr f 
               where b.insult_id=f.id and b.id=%
   NDB API:
       batched key access, TC selection hints
   NDB KERNEL: 
       how the latency is bad through MySQL but not so much through API 
               How this is changing with MySQL Server Batched Key Access for joins in (hopefully) demoable code
   Performance
       NDBAPI (C++) versus NDBAPI(Java) versus SQL
Photo of Stewart Smith

Stewart Smith

Percona

Stewart Smith joined Percona in 2011 as Director of Server Development with a deep background in database internals including MySQL, MySQL Cluster, Drizzle, InnoDB and HailDB.

Prior to joining Percona, Stewart worked at Rackspace on the Drizzle database server focusing on getting it through a critical milestone of a stable Generally Available (GA) release. Prior to Rackspace, he worked on Drizzle as a member of the CTO Labs group inside Sun Microsystems.

As one of the founding core developers of the Drizzle database server Stewart has deep expertise in the code base. He had direct involvement in significant refactoring of the database server including removing the FRM, the InnoDB storage engine, xtrabackup, the storage engine API, CATALOG support and countless bug fixes. He also maintains HailDB, a shared library offering a NoSQL C API directly to InnoDB.

At Sun Microsystems, and MySQL before that, Stewart was a Senior Software Engineer in the MySQL Cluster team working on core code and features inside the MySQL Server and the Cluster codebase working on projects such as: geographical asynchronous replication, online add node, online backup, NDBINFO for improved monitoring and the Win32 port.

He’s been found speaking at MySQL User Conferences, linux.conf.au, OSCON, OSDC, SAGE-AU and more.

Photo of Monty Taylor

Monty Taylor

HP

Monty Taylor runs developer automation for the OpenStack project, including the developer tooling, continuous integration and automation systems. Monty is also a core developer on the Drizzle project and was a Senior Consultant for MySQL, Inc. before they got gobbled up. He’s an expert in distributed systems and will bend your ear with stories of Burning Man if you let him.

Sponsors
  • Kickfire
  • Zmanda, Inc.
  • Continuent
  • EDS
  • JasperSoft
  • Sun Microsystems
  • Symantec Anti-Virus Software
  • XAware
  • Data Direct Technologies
  • Dolphin Interconnect Solutions
  • Hewlett Packard
  • Infobright, Inc
  • Linagora
  • Microsoft
  • OpSource
  • Oracle
  • Pentaho
  • R1Soft
  • Red Hat
  • Ticketmaster
  • TechRepublic

Contact Us

View a complete list of MySQL contacts.