You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
145257: workload: add a literal implementation of tpcc r=mgartner a=ajstorm
Our current TPC-C kit is heavily optimized. For example, in several places we combine an update and a select with an UPDATE...RETURNING statement. In other places, we use IN lists to reduce the number of round-trips from the client to the server. As best I can tell, all of this is acceptable according to the specification (after all, you can reduce the round-trips to 1 by implementing each transaction as a stored procedure), however some kits implement things much more literally, with one client-server roundtrip for each step of each transaction.
This commit adds a literal implementation for the New Order and Payment transactions. We're focusing our attention there for now, as these two transactions comprise 88% of the workload.
One change made in this commit which isn't fully explained by code comments is the movement of the inserts into the orders and new orders table higher up in the New Order transaction. This shouldn't have any bearing on the transaction logic, but is moved up to allow for more common code, and also since according to the spec, it should occur before the items are processed.
NOTE: There's a significant amount of whitespace changes in this commit. When reviewing, you'll want to turn off the whitespace changes to avoid having to review all of them.
Epic: none
Release note: none
Co-authored-by: Adam Storm <[email protected]>
0 commit comments