RE: rowid value
Date: Fri, 8 Aug 2014 15:29:40 -0400
Message-ID: <17d701cfb33f$19d3dba0$4d7b92e0$_at_rsiz.com>
If someone tells me they have a duplicate rows, I think: All columns the same
If someone tells me they have a unique key violation I would not call the rows duplicates nor assume they are without investigation.
If someone tells me they have duplicates, then I wonder (and ask).
Agreed these are very different cases.
Import jobs done twice with no constraint are duplicate rows.
Application duplicate control without constraints could be either.
If you have PK and UKs defined, they don’t happen in your tables, and if you’ve got at least one, there will be no duplicate rows.
mwf
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Powell, Mark
Sent: Friday, August 08, 2014 2:55 PM
To: ORACLE-L
Subject: RE: rowid value
Jared said, “Identifying which 'duplicate' to delete it [sic] not always straight forward.”
No it isn’t since the non-key columns may differ and in some cases you actually should determine which row to save based on the non-key data. Worse is when you discover you need some data from multiple rows.
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Jared Still
Sent: Friday, August 08, 2014 2:23 PM
To: kibeha_at_gmail.com
Cc: Hemant-K.Chitale_at_sc.com; Brian Zelli; ORACLE-L
Subject: Re: rowid value
On Wed, Aug 6, 2014 at 1:15 AM, Kim Berg Hansen <kibeha_at_gmail.com> wrote:
If the idea of deleting the "higher" ROWID is to delete the "newest" row, that is not at all certain. But if the rows are identical duplicates, that shouldn't matter ;-)
Probably this is already stated somewhere in this thread, but it bears repeating.
Duplicate refers to PK/UK, not the row.
Identifying which 'duplicate' to delete it not always straight forward.
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
Sr Oracle DBA at Pythian
Pythian Blog http://www.pythian.com/blog/author/still/ Oracle Blog: http://jkstill.blogspot.com Home Page: http://jaredstill.com
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Aug 08 2014 - 21:29:40 CEST