[Mono-bugs] [Bug 79727][Nor] New - DataRow.GetChildRows() is slow, needs index

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Oct 23 13:17:06 EDT 2006

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by prensing at cimetrics.com.


--- shadow/79727	2006-10-23 13:17:06.000000000 -0400
+++ shadow/79727.tmp.900	2006-10-23 13:17:06.000000000 -0400
@@ -0,0 +1,52 @@
+Bug#: 79727
+Product: Mono: Class Libraries
+Version: 1.1
+OS Details: Fedora Core 5
+Status: NEW   
+Priority: Normal
+Component: Sys.Data
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: prensing at cimetrics.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: DataRow.GetChildRows() is slow, needs index
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+The Mono implementation of DataRow.GetChildRows() is very slow.
+The code looks to see if there is in Index available. However, *nothing*
+ever builds the appropriate Index for the child table. ForeignKeyConstraint
+should add an index to the child table. Alternately, GetChildRows() could
+use "GetIndex" instead of "FindIndex" so that an index is built and saved.
+I am attaching a a small test program (parentChildTest.cs) which highlights
+the problem. 
+Steps to reproduce the problem:
+1. Compile parentChildTest.cs
+2. Run like "parentChildTest.exe 10000".
+3. Program prints elapsed time to to getChildRows() and getParentRow() lookups.
+Actual Results:
+On my machine with 10000 rows in the test tables, getChildRows() takes
+about 7.8 seconds. In contrast, getParentRow() takes about 0.06 seconds.
+On Windows under .NET, both sets of calls take roughly the same amount of
+time, roughly 0.05 seconds.
+Expected Results:
+getChildRows() time should be almost the same as getParentRow() time.
+How often does this happen? 
+Additional Information:
+If anyone knows a workaround to force the right index to be built, please
+post it here.

More information about the mono-bugs mailing list