Skip to main content

In List Predicate Optimization

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, 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:

    application.yml
    jimmer:
    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:

    JSqlClient sqlClient = JSqlClient
    .newBuilder()
    .setInListPaddingEnabled(true)
    // ...omitted other configurations...
    .build();

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:

    application.yml
    jimmer:
    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:

    JSqlClient sqlClient = JSqlClient
    .newBuilder()
    .setInListToAnyEqualityEnabled(true)
    // ...omitted other configurations...
    .build();