Order creation throughput
You can query Oracle or Db2 to calculate the rate at which orders were created on a specific date.
For example, in Oracle, to calculate the rate at which orders were created on a specific date (e.g., July 4, 2011), you can issue the following query:
select substr(order_header_key,1,10) time, count(*) as count
from yfs_order_header
where order_header_key > '20110704000000' and
order_header_key < '20110704999999'
group by substr(order_header_key,1,10);
This query produces a listing like this:
TIME COUNT
------------------------ ----------
2011070406 3333
2011070407 3366
2011070408 3333
Note: For Db2®, you should issue throughput
queries as uncommitted reads. By default, queries run at the cursor stability level. As a result,
Db2 has to obtain a read share lock on the record it is
reading. Queries that are made against tables that have a high rate of insert or update activities
block outdated records by using update or exclusive locks.
For Db2 to issue the query above at the uncommitted read lock level, issue the query with the "WITH UR" option:
select substr(order_header_key,1,10) time, count(*) as count
from yfs_order_header
where order_header_key > '20110704000000' and
order_header_key < '20110704999999'
group by substr(order_header_key,1,10)
with UR;