-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ab83d2
commit b9566ac
Showing
14 changed files
with
737 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
--- | ||
sidebar_position: 15 | ||
title: In List Predicate Optimization | ||
--- | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
:::caution | ||
This article only explains how to enable the relevant options. | ||
|
||
As for what these options are used for, please refer to [Query Chapter/DSL Expression/IN LIST/Optimization](../query/expression#optimization), this article will not repeat it. | ||
::: | ||
|
||
## Enable Padding Optimization | ||
|
||
Two ways to enable: | ||
|
||
- If you are using the Jimmer Spring Boot Starter, modify `application.yml` (or `application.properties`) as follows: | ||
|
||
```sh title="application.yml" | ||
jimmer: | ||
#highlight-next-line | ||
in-list-padding-enabled: true | ||
``` | ||
|
||
- If you are not using the Jimmer Spring Boot Starter, you need to call the following API when creating the `sqlClient`: | ||
|
||
<Tabs groupId="language"> | ||
<TabItem value="java" label="Java"> | ||
|
||
```java | ||
JSqlClient sqlClient = JSqlClient | ||
.newBuilder() | ||
// highlight-next-line | ||
.setInListPaddingEnabled(true) | ||
// ...omitted other configurations... | ||
.build(); | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="kotlin" label="Kotlin"> | ||
|
||
```kotlin | ||
val sqlClient = newKSqlClient { | ||
// highlight-next-line | ||
setInListPaddingEnabled(true) | ||
// ...omitted other configurations... | ||
} | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
## Enable Any Equality Optimization | ||
|
||
Two ways to enable: | ||
|
||
- If you are using the Jimmer Spring Boot Starter, modify `application.yml` (or `application.properties`) as follows: | ||
|
||
```sh title="application.yml" | ||
jimmer: | ||
#highlight-next-line | ||
in-list-to-any-equality-enabled: true | ||
``` | ||
|
||
- If you are not using the Jimmer Spring Boot Starter, you need to call the following API when creating the `sqlClient`: | ||
|
||
<Tabs groupId="language"> | ||
<TabItem value="java" label="Java"> | ||
|
||
```java | ||
JSqlClient sqlClient = JSqlClient | ||
.newBuilder() | ||
// highlight-next-line | ||
.setInListToAnyEqualityEnabled(true) | ||
// ...omitted other configurations... | ||
.build(); | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="kotlin" label="Kotlin"> | ||
|
||
```kotlin | ||
val sqlClient = newKSqlClient { | ||
// highlight-next-line | ||
setInListToAnyEqualityEnabled(true) | ||
// ...omitted other configurations... | ||
} | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.