A computer implemented method for processing database transactions, comprising the steps of: receiving, at a coordinator node, a query for a transaction; determining if the transaction is a single shard transaction or a multi-shard transaction; when the transaction is determined to be a multi-shard transaction: requesting a distributed transaction ID, DXID, for the transaction from a global transaction manager, GTM, receiving the DXID for the transaction from the GTM at the coordinator node, sending the query and the DXID to two or more data nodes associated with the transaction; and when the transaction is determined to be a single shard transaction: sending the query to a single data node associated with the transaction without first requesting a DXID from the GTM; wherein the method further comprises: maintaining, in a data node, a list of active local transactions, and for a multi-shard transaction, each data node associated with the transaction mapping the DXID to a local transaction ID, TXID; and when reading data modified by a multi-shard transaction, determining that the data is visible when one of the following is determined to be true: the multi-shard transaction is committed and the multi-shard transaction is not in a global snapshot but is in a local snapshot; the multi-shard transaction is committed and the DXID is not in the global snapshot or the local snapshot, and a global snapshot minimum DXID is greater than the multi-shard transaction DXID; and the multi-shard transaction is in a prepare state and then commits, and the multi-shard transaction is not in the global snapshot and is in the local snapshot; wherein when the transaction is determined to be a multi-shard transaction, the method further comprises steps of requesting a global snapshot from the GTM, and sending the global snapshot to the two or more data nodes associated with the transaction, wherein the two or more data nodes receiving the global snapshot, merge the global snapshot with a local snapshot. receiving, at a coordinator node, a query for a transaction; determining if the transaction is a single shard transaction or a multi-shard transaction; when the transaction is determined to be a multi-shard transaction: requesting a distributed transaction ID, DXID, for the transaction from a global transaction manager, GTM, receiving the DXID for the transaction from the GTM at the coordinator node, sending the query and the DXID to two or more data nodes associated with the transaction; and requesting a distributed transaction ID, DXID, for the transaction from a global transaction manager, GTM, receiving the DXID for the transaction from the GTM at the coordinator node, sending the query and the DXID to two or more data nodes associated with the transaction; and when the transaction is determined to be a single shard transaction: sending the query to a single data node associated with the transaction without first requesting a DXID from the GTM; wherein the method further comprises: maintaining, in a data node, a list of active local transactions, and for a multi-shard transaction, each data node associated with the transaction mapping the DXID to a local transaction ID, TXID; and when reading data modified by a multi-shard transaction, determining that the data is visible when one of the following is determined to be true: maintaining, in a data node, a list of active local transactions, and for a multi-shard transaction, each data node associated with the transaction mapping the DXID to a local transaction ID, TXID; and when reading data modified by a multi-shard transaction, determining that the data is visible when one of the following is determined to be true: the multi-shard transaction is committed and the multi-shard transaction is not in a global snapshot but is in a local snapshot; the multi-shard transaction is committed and the DXID is not in the global snapshot or the local snapshot, and a global snapshot minimum DXID is greater than the multi-shard transaction DXID; and the multi-shard transaction is in a prepare state and then commits, and the multi-shard transaction is not in the global snapshot and is in the local snapshot; wherein when the transaction is determined to be a multi-shard transaction, the method further comprises steps of requesting a global snapshot from the GTM, and sending the global snapshot to the two or more data nodes associated with the transaction, wherein the two or more data nodes receiving the global snapshot, merge the global snapshot with a local snapshot.