Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> sql debugging tip: 'duplicate rows' from a complex query

sql debugging tip: 'duplicate rows' from a complex query

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Fri, 30 Jan 2004 12:35:09 -0500
Message-ID: <3Jidnec-iZpyCIfdRVn_iw@comcast.com>


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

Received on Fri Jan 30 2004 - 11:35:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US