SAP IQ: How to Estimate the Number of Rows Loaded
It is a common practice to transform the data in different environments and then move the data to SAP IQ (for example, we can prepare dataset/fact tables in SAS and then load then to the EDW in SAP IQ).
To monitor the loading process it is important to know the number of rows that has been loaded at a given time and the average loading time.
Here, I present a simple method to estimate those 2 metrics.
1. Identify the transaction ID of the loading process (column TxnID of sp_connection store procedure).
2. Execute the following query:
select datediff(ss, TxnCreateTime, now()) as secondsOfExec,
round(SpCount/2, 0) as RowsLoaded,
round(SpNumber / datediff(ss, TxnCreateTime, now()),0) as avgRowsPerSecond
from sp_iqtransaction()
where TxnID = <TxnID>
You will get a result similar to this:
secondsOfExec RowsLoaded avgRowsPerSecond
—————- ———— ————————-
332 20083 120
1 record(s) selected [Fetch MetaData: 0ms] [Fetch Data: 0ms]
[Executed: 02/04/2014 11:57:24 AM] [Execution: 31ms]
Explanation:
IQ sets an implicit savepoint before and after every DML command[1].
This post was first published in my personal blog at SAP IQ: How to Estimate the Number of Rows Loaded | ARBIME