Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> sql debugging tip: 'duplicate rows' from a complex query
ever have a complex statement that works just fine in development and test
but once you get it into production returns duplicate rows?
had to figure one of those out last night, and the more we locked at the statement and examined the data, the more our heads hurt
this morning i remembered a quick way to determine what table is contributing to the extra rows:
we simply added the rowid of each table to the select list, and within a few minutes saw which table was returning too many rows by looking for changes in rowid without changes in data -- a whole lot easier than digging thru the data and doing extensive rewrites to progressively eliminate, or buildup, joins
![]() |
![]() |