content_image/835487.jpg content_image/835492.jpg
<img src='content_image/835487.jpg'>

18 rows in set (0.00 sec) 

Similarly, you can see the changes in the NDB API statistics counters caused by inserting a row into t : Insert the row, then run the same SHOW STATUS  statement used in the previous example, as shown here: 

mysql> INSERT INTO t VALUES (100); Query OK, 1 row affected (0.00 sec) 

mysql> SHOW STATUS LIKE ’ndb_api%session%’; 

<img src='content_image/835492.jpg'>

18 rows in set (0.00 sec) 

We can make a number of observations from these results: 

•Although we created t  with no explicit primary key, 5 primary key operations were performed in doing so (the difference in the “before”  and “after”  values of Ndb_api_pk_op_count_session , or 6 minus 1). This reflects the creation of the hidden primary key that is a feature of all tables using the NDB  storage engine. 

•By comparing successive values for Ndb_api_wait_nanos_count_session , we can see that the NDB API operations implementing the CREATE TABLE  statement waited much longer (706871709 - 820705 = 706051004 nanoseconds, or approximately 0.7 second) for responses from the data nodes than those executed by the INSERT  (707370418 - 706871709 = 498709 ns or roughly .0005 second). The execution times reported for these statements in the mysql  client correlate roughly with these figures. 

On platforms without sufficient (nanosecond) time resolution, small changes in the value of the WaitNanosCount  NDB API counter due to SQL statements that execute very quickly may not always be visible in the values of Ndb_api_wait_nanos_count_session , Ndb_api_wait_nanos_count_slave , or Ndb_api_wait_nanos_count . 

•The INSERT  statement incremented both the ReadRowCount  and TransLocalReadRowCount  NDB API statistics counters, as reflected by the increased values of Ndb_api_read_row_count_session and Ndb_api_trans_local_read_row_count_session . 

