Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improve][JDBC] improve jdbc sink option #3864

Merged
merged 2 commits into from
Jan 6, 2023

Conversation

EricJoy2048
Copy link
Member

No description provided.

@@ -46,22 +47,20 @@ public class JdbcConfig implements Serializable {

public static final Option<Boolean> AUTO_COMMIT = Options.key("auto_commit").booleanType().defaultValue(DEFAULT_AUTO_COMMIT).withDescription("auto commit");

public static final Option<Integer> BATCH_SIZE = Options.key("batch_size").intType().noDefaultValue().withDescription("batch size");
public static final Option<Integer> BATCH_SIZE = Options.key("batch_size").intType().defaultValue(1000).withDescription("batch size");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why set batch size 1000 as the default value, does it improve the efficiency of jdbc?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically, the performance would be better if the value was higher, but I didn't test.

Copy link
Contributor

@ic4y ic4y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@TaoZex TaoZex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@EricJoy2048 EricJoy2048 merged commit 768a930 into apache:dev Jan 6, 2023
EricJoy2048 added a commit to EricJoy2048/incubator-seatunnel that referenced this pull request Jan 6, 2023
* improve jdbc sink option

* improve option default get
EricJoy2048 added a commit to EricJoy2048/incubator-seatunnel that referenced this pull request Jan 6, 2023
* improve jdbc sink option

* improve option default get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants