public class SJoinConfig
extends java.lang.Object
SJoinCursor
. The join cursor
configuration is specified when calling SDatabase.join(com.sleepycat.client.SCursor[], com.sleepycat.client.SJoinConfig)
.
To create a configuration object with default attributes:
SJoinConfig config = new SJoinConfig();To set custom attributes:
SJoinConfig config = new SJoinConfig(); config.setNoSort(true);
Constructor and Description |
---|
SJoinConfig()
Creates an instance with the default settings.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getNoSort()
Returns whether automatic sorting of the input cursors is disabled.
|
void |
setNoSort(boolean noSort)
Specifies whether automatic sorting of the input cursors is disabled.
|
public boolean getNoSort()
public void setNoSort(boolean noSort)
Joined values are retrieved by doing a sequential iteration over the
first cursor in the cursor array, and a nested iteration over each
following cursor in the order they are specified in the array. 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.
Unless this method is called with true, SDatabase.join(com.sleepycat.client.SCursor[], com.sleepycat.client.SJoinConfig)
does this
sort on behalf of its caller.
If the data are structured so that cursors with many data items also
share many common elements, higher performance will result from listing
those cursors before cursors with fewer data items; that is, a sort
order other than the default. Calling this method permits applications
to perform join optimization prior to calling SDatabase.join(com.sleepycat.client.SCursor[], com.sleepycat.client.SJoinConfig)
.
noSort
- whether automatic sorting of the input cursors is disabledCopyright (c) 2016, 2019 Oracle and/or its affiliates. All rights reserved.