on 06-08-2015 3:20 PM
Hi experts,
I have a need of real time on SAP IQ 16.
Here's my situation. Let's say I have two databases "HISTORY" and "REAL_TIME".
My HISTORY database is refreshed one time per day. My REAL_TIME database is refreshed every 5 minutes, with an ETL which loads bulk text files.
I got a reporting system on-top of SAP IQ which add the HISTORY to the REAL_TIME, in order to have all my information stored in a view.
Here's the main requirement :
1. My view can't be empty (So it's not possible to simply truncate my table and load the text file)
So my question is quite easy : how I can do all of this with SAP IQ, knowing the LOCK process and my requirement?
Thanks you for your advices!
Kind regards,
Hi
Since IQ implements snapshot isolation, deleting all rows in a table and loading it from a text file should not be a problem. I don't remember right now if TRUNCATE TABLE in IQ commits automatically, but DELETE of all rows surely not, and in IQ TRUNCATE TABLE and DELETE of all rows are very much similar performance-wise. So, you can just delete all rows from your staging table, load it with LOAD TABLE statement and only then commit the transaction. In the meanwhile, all other transactions will see the old content of the staging table. Even more, all transactions opened before yours will continue to see your old data until they commit/rollback. Anyway, SELECT queries will not be blocked by your activity on the staging table and they should not see your staging table empty at any point.
Hope it helps
Leonid Gvirtz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.