Home » SQL & PL/SQL » SQL & PL/SQL » PL/SQL - Getting counts after Merge Statement completion.
icon5.gif  PL/SQL - Getting counts after Merge Statement completion. [message #222873] Tue, 06 March 2007 15:41 Go to next message
kedarterdalkar
Messages: 1
Registered: March 2007
Junior Member
Is there a way we can get the counts for Inserts, Updates and Delete separately once the execution of Merge statement has been completed or done?

[Updated on: Tue, 06 March 2007 15:43]

Report message to a moderator

Re: PL/SQL - Getting counts after Merge Statement completion. [message #222939 is a reply to message #222873] Wed, 07 March 2007 00:32 Go to previous messageGo to next message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
No - not really....

In v10g, there is a table that is used to track changes to each table so that Oracle can determine whether statistics are stale and whether they need to be re-gathered.

I can't remember the name of the table, but it logs the number of inserts, updates, and deletes on each table since stats were last gathered. When stats are gathered, the entry is removed.

By checking the contents of this table before and after the merge you could derive the number of inserts, updates, and deletes.

Note that there was (is?) a bug in 10.1 where MERGE /*+APPEND*/ did not log these changes correctly.

Having said all this, I would completely ignore it if I were you. Ask yourself if you REALLY need to know, or are you just satisfying some legacy reconciliation standards. If it's that important, use separate INSERT and UPDATE statements.

Ross Leishman
Re: PL/SQL - Getting counts after Merge Statement completion. [message #223512 is a reply to message #222873] Fri, 09 March 2007 04:37 Go to previous messageGo to next message
ddkdhar
Messages: 68
Registered: February 2007
Member

whre can i get information about this topic
Re: PL/SQL - Getting counts after Merge Statement completion. [message #223637 is a reply to message #223512] Fri, 09 March 2007 21:51 Go to previous message
Barbara Boehmer
Messages: 8635
Registered: November 2002
Location: California, USA
Senior Member
http://www.quest-pipelines.com/newsletter-v4/0903_D.htm
Previous Topic: Passing of a parametrrs to procedure
Next Topic: PROBLEM WITH LEFT OUTER JOIN
Goto Forum:
  


Current Time: Wed Dec 07 09:01:30 CST 2016

Total time taken to generate the page: 0.15032 seconds