I am trying to come up with some usage vs cost metric for our DB2 Subsystems. In that regard, I am trying to find some industry benchmarks on running queries. Can anyone provide a ball-park figure for the CPU time taken to run a) Simple b) Medium c) Complex query?
Simple query: A select statement without where clause
Medium query: Contains where clause
Complex query: Contains joins
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
I'd suggest that you reconsider your "grouping"s.
Rarely should there be a production query with no where clause - especially not online. Batch queries are often considered separately from online queries when performing performance analysis.
CPU time is only one measurement of cost.
A query that joins 3 tables efficiently to retriece 5 rows will take fewer DB2 cpu cycles than a single select that traverses 10 million rows - with or without a where.
Depending on the speed of your cpu(s), the type of dasd used, the number of rows, the length of the rows etc, what would be good "ball-park figures" will vary. You might talk with your IBM rep about a starting point for your environment.
As you begin, you will want to become familiar with the DB2 Statistics and Accounting records.
With some work, you will be able to report usage by various groupings. Assigning a $ cost to them will take much more work unless somone just invents amounts to use.