D3D12 enables applications to correlate results obtained from timestamp queries with results obtained from calling QueryPerformanceCounter. This is enabled by the call ID3D12CommandQueue::GetClockCalibration.
A timestamp is sampled by the GPU at the moment that the GPU is finished with all of the preceding workload. It's the same behavior adopted by Direct3D 11 (see D3D11_QUERY_TIMESTAMP in the Direct3D 11.3 Functional Specification on GitHub). That means that timestamp queries are a bottom-of-pipe (BOP) operation in Direct3D 12.
GetClockCalibration samples the GPU timestamp counter for a given command queue and samples the CPU counter via QueryPerformanceCounter at nearly the same time. Again this API fails (returning E_FAIL) if the specified command queue does not support timestamps (see the table in the Queries topic).
Note that GPU and CPU timestamp counters are not necessarily directly related to the clock speed of these processors, but instead work from timestamp ticks.
Timestamp queries
You can obtain timestamps as part of a command list (rather than a CPU-side call on a command queue) via timestamp queries. (See Queries for more information about queries in general).
For accuracy, use floating-point arithmetic when calculating second or millisecond intervals of timestamps. For example, use queriedTicks / (double)Frequency instead of queriedTicks / Frequency.
Relational databases store many different types of data for many different types of applications. Some databases have thousands of users and some have just one user. Some tables have tens of rows while others have millions of rows. Some data is unique while other data is duplicated. All of these variables mean that database management systems (DBMSs) need systems to understand the data and the queries that are running against this data to ensure optimum performance. When you perform tune a database, it's im