Now I'll discuss the test cases and their results, as well as the test environments and other factors.
The Test Cases
The test cases are as follows:
Inserting an order with 10 detail rows (repeated 500 times, measured when having 1,000,000 orders)
Fetching 100 specific orders out of 1,000,000, one by one
The same as B, but this time with a JOIN with the orderdetail table
The metric is the time that the test case takes to execute.
You can easily compare the size overhead of the database, if you want to. Just run some INSERTs for the INT case in one new database and run the same number of INSERTs for the GUID case in another new database. Then compare the file sizes afterward.
Because the test database is so simplified, the size metric is a bit inaccurate because the number of foreign keys compared to ordinary columns is pretty big. Keep this in mind if you evaluate the size metric. This also applies to the time difference, but there are definitely situations in which the database consists of almost only foreign keys.
All tests will be executed by a single user. The tests will be executed directly at the database serverI'm testing only at the data tier in this article. For example, the database will create the GUIDs with NEWID(). You could quite easily expand the test to run from several users or from an application server instead. A very relevant test would be to let the application server create the GUIDs instead, but that is beyond the scope of this article.