Menu

The GetALL Method

2005-05-30
2013-03-07
  • Nobody/Anonymous

    The getAll method implements the following code stretch.

    Do While Not obCursor.EOF
                obj = Me.getNewObject
                obCursor.loadObject(obj)
                If getAssociations And Not obj.AssociationsLoaded Then
                    'Load the full object
                    obj.Retrieve()
                End If
                obCol.Add(obj)
                obCursor.nextCursor()
            Loop

    However, for many rows returned, the application it is many slow. I changed this code for:

    obCursor = obRC.perform(Me)
    Dim ds As DataSet = obCursor.ResultSet.ResultSet

    Returning the DataSet directly, the application is fast. However, when the table to have relationship, the data of the tables children not is returned. How i can resolve this is problem?
    Thank,
    Meiriana.

     
    • Richard Banks

      Richard Banks - 2005-05-30

      I assume you are doing a getAll with getAssociations set to true.

      When this happens, each associated object is processed separately to load it's own associations (ie multi-level associations).

      This is where the speed loss occurs.

      There was a much earlier version where I retrieved all possible associations in one statement, but the processing was extremely slow due to the massive amount of redundant data.

      I've been thinking of ways to improve the performance in these situations that finds the middle ground but I have yet to have time to think things through properly.

       

Log in to post a comment.