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

Stewart Smith (Percona), Monty Taylor (Rackspace Cloud)

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

Rackspace Cloud

Monty currently works as a core developer on the Drizzle project for Rackspace. Before Drizzle he was a Senior Consultant for MySQL, Inc and then Sun Microsystems focusing on Clustering and High Availability. Between MySQL Consulting and speaking at conferences, he has been to 5 of the 7 continents (and is always aiming for more)

Before MySQL, Monty started several small companies, none of which were the next Facebook. He is an ardent supporter of Free Software and is actively involved in packaging efforts for Debian and Ubuntu. Monty spends the majority of his non-hacking time as a theatre director and lighting designer. He is Member of Seattle based theatre company the Satori Group.

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

Sponsorship Opportunities

For information on exhibition and sponsorship opportunities at the conference, contact Sharon Cordesse at scordesse@oreilly.com.

Download the MySQL Sponsor/Exhibitor Prospectus

Media Partner Opportunities

Download the Media & Promotional Partner Brochure (PDF) for more information on trade opportunities with O'Reilly conferences, or contact mediapartners@oreilly.com.

Press and Media

For media-related inquiries, contact confpr@oreilly.com.

MySQL Conference Newsletter

To stay abreast of conference news and to receive email notification when registration opens, please sign up for the MySQL Conference newsletter.

Contact Us

View a complete list of MySQL contacts.