Assembly: libdb_dotnet181 (in libdb_dotnet181.dll) Version: 18.1.32.0
Syntax
C# |
---|
public JoinCursor Join( SecondaryCursor[] lst, bool sortCursors ) |
Visual Basic (Declaration) |
---|
Public Function Join ( _ lst As SecondaryCursor(), _ sortCursors As Boolean _ ) As JoinCursor |
Visual C++ |
---|
public: JoinCursor^ Join( array<SecondaryCursor^>^ lst, bool sortCursors ) |
Parameters
- lst
- Type: array<
BerkeleyDB..::.SecondaryCursor
>[]()[]
An array of SecondaryCursors. Each cursor must have been initialized to refer to the key on which the underlying database should be joined.
- sortCursors
- Type: System..::.Boolean
If true, sort the cursors from the one that refers to the least number of data items to the one that refers to the most. If the data is structured so that cursors with many data items also share many common elements, higher performance results from listing those cursors before cursors with fewer data items; a sort order other than the default. A setting of false permits applications to perform join optimization prior to calling Join.
Return Value
A specialized join cursor for use in performing equality or natural joins on secondary indices.Remarks
Once the cursors have been passed as part of lst, they should not be accessed or modified until the newly created JoinCursorhas been closed, or else inconsistent results may be returned.
Joined values are retrieved by doing a sequential iteration over the first cursor in lst, and a nested iteration over each secondary cursor in the order they are specified in the curslist parameter. This requires database traversals to search for the current datum in all the cursors after the first. For this reason, the best join performance normally results from sorting the cursors from the one that refers to the least number of data items to the one that refers to the most.