MySQL Forums
Forum List  »  NDB clusters

Transaction coordinator and select queries
Posted by: Philipp Bachmann
Date: November 25, 2008 06:41PM

Hello,

assuming i got the following simple table:

CREATE TABLE City (
Name char(35) NOT NULL,
CountryCode char(3) NOT NULL
) ENGINE=NDB

If i now issue, as part of a transaction, the SQL query (1) "SELECT * FROM City WHERE CountryCode='UK'" against a MySQL Server connected to the Cluster, is there a transaction coordinator involved?
Or is, because of the READ COMMITTED isolation level used by MySQL Cluster, generally no TC needed for select queries?

I found the following quote in Chapter 3.1.2 Data Node Process (ndbd) page 31, MySQL 5.1 Cluster DBA Certification Study Guide.

"When data is read form the cluster, a data node is responsible for processing the request for data. The MySQL Servre (SQL node) makes a request ot the cluster. The SQL node contacts a data node with the request. A process on the data node known as the transaction coordinator handles the request... The transaction coordinator contacts a process on each data node containing the needed records, called the local query hanlder. The local query handlers on the individual data nodes respond with the requested data and the transaction coordinator returns the records to the MySQL server."

(I assume the select statement results in a ndb api parallel table scan.)

On the other hand in the same book, chapter 8.3.4. Table Scans, there's an irritating picture, without a TC or even a kind of data node acting as a middleman that recieves the request from the MySQL Server, then asks all other data nodes for the requested data, recieve their responses and send the whole collection of data back to the MySQL server.
Instead the MySQL server seems to establish a connection to every data node and directly recieves their responses.

How is this simple select statement/parallel table scan handled in MySQL Cluster?

Thanks,
Phil

Options: ReplyQuote


Subject
Views
Written By
Posted
Transaction coordinator and select queries
5332
November 25, 2008 06:41PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.