Forum

General discussion on using the Kognitio Analytical Platform.
Contributor
Offline
Posts: 23
Joined: Thu May 23, 2013 5:11 pm

How many rows are remaining on my INSERT operation?

by Simon.Darkin » Tue Aug 30, 2016 4:05 pm

Is it possible to determine the progress of an INSERT operation or more specifically can I identify how many rows are yet to be inserted?
Reply with quote Top
Contributor
Offline
Posts: 23
Joined: Thu May 23, 2013 5:11 pm

Re: How many rows are remaining on my INSERT operation?

by Simon.Darkin » Tue Aug 30, 2016 4:06 pm

You can’t query the target table directly as the insert will hold an exclusive table lock and querying it ‘at now’ means you will be ignoring the active insert.

So with that in mind you would need to identify three items of information to determine how many rows are left to insert:

a) count(*) against the source table (with predicates as required) to identify how many rows will be inserted
b) count(*) against the target table specifying ‘at now’ to identify how many rows were in the target table before the insert started
c) sum(nrows) in ipe_ftable for the target table id to identify how many rows are in the table at that moment in time

Then calculate (a-(c-b)) to identify how many records still need to be inserted.

If LOW_TNO and HIGH_TNO have the same value in IPE_FTABLE for the target table id then you know that the table did not contain any rows prior to the current insert in which case the calculation for remaining rows is simplified as (a-c).

Note that heavy disk I/O operations like repack will have a significant impact on INSERT performance and so you would expect the rate of rows being inserted to dramatically increase once a repack or similar has ended.
Reply with quote Top

Who is online

Users browsing this forum: No registered users and 1 guest

cron