Tag

JDBC

1 views collected around this technical thread.

Java Captain
Java Captain
May 9, 2025 · Databases

Using H2 Database in Embedded, Server, and Mixed Modes with Java

This article demonstrates how to use the H2 database with Java 1.8, covering embedded (file and memory) modes, server modes (Web, TCP, PG), mixed mode configurations, required dependencies, and provides complete JUnit test code examples for creating, accessing, and managing tables.

H2JDBCJava
0 likes · 17 min read
Using H2 Database in Embedded, Server, and Mixed Modes with Java
Java Captain
Java Captain
Mar 22, 2025 · Databases

Performance Comparison of UUID, Auto‑Increment, and Random Keys in MySQL

This article investigates MySQL's recommendation against using UUID or random Snowflake IDs as primary keys by creating three tables with different key strategies, running Spring Boot/JDBC performance tests, analyzing index structures, and concluding that auto‑increment keys offer superior insertion efficiency and fewer drawbacks.

Database IndexJDBCMySQL
0 likes · 10 min read
Performance Comparison of UUID, Auto‑Increment, and Random Keys in MySQL
Java Tech Enthusiast
Java Tech Enthusiast
Mar 13, 2025 · Databases

Performance Comparison of UUID vs Auto-Increment IDs in MySQL

Benchmarking three MySQL tables—auto_increment, UUID, and random long keys—shows that sequential auto_increment inserts are fastest, random keys are slower, and UUIDs dramatically lag due to random I/O and fragmentation, so use auto_increment for most workloads and reserve UUIDs only for required global uniqueness.

IndexingJDBCMySQL
0 likes · 10 min read
Performance Comparison of UUID vs Auto-Increment IDs in MySQL
JD Tech Talk
JD Tech Talk
Mar 7, 2025 · Fundamentals

1. Introduction to SPI

This article introduces Java's Service Provider Interface (SPI) mechanism, explaining its role in decoupling interface definitions from implementations, with examples in JDBC, Spring Boot, and Dubbo.

JDBCJava FundamentalsJava SPI
0 likes · 11 min read
1. Introduction to SPI
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 27, 2025 · Backend Development

How to Log SQL Statements in Spring Boot 3 Using JDBC, JPA, MyBatis & datasource-proxy

This article announces a Spring Boot 3 case collection with 100 permanent examples and then provides a comprehensive guide on recording SQL statements in Spring Boot applications via JDBC, JPA, MyBatis and the datasource‑proxy library, including configuration snippets, code samples and visual output illustrations.

JDBCJPAMyBatis
0 likes · 8 min read
How to Log SQL Statements in Spring Boot 3 Using JDBC, JPA, MyBatis & datasource-proxy
macrozheng
macrozheng
Feb 12, 2025 · Databases

Mastering Spring Boot Database Connection Pools: HikariCP vs Druid

This guide explains the need for JDBC connection pools, compares popular pools like HikariCP and Druid, and provides step‑by‑step configurations for both custom property files and Spring Boot auto‑configuration, helping you efficiently manage database connections in Java applications.

Database Connection PoolDruidHikariCP
0 likes · 20 min read
Mastering Spring Boot Database Connection Pools: HikariCP vs Druid
macrozheng
macrozheng
Feb 11, 2025 · Databases

Speed Up XML‑to‑MySQL Imports: Reduce 300 s to 4 s with JDBC Batch & Async

This article walks through optimizing a Java‑based XML‑to‑MySQL import, showing how to cut processing time from 300 seconds to just 4 seconds by enabling JDBC batch writes, using rewriteBatchedStatements, applying async writes with Disruptor, and tuning MySQL settings.

AsyncJDBCJava
0 likes · 12 min read
Speed Up XML‑to‑MySQL Imports: Reduce 300 s to 4 s with JDBC Batch & Async
Java Tech Enthusiast
Java Tech Enthusiast
Feb 2, 2025 · Backend Development

Optimizing XML-to-MySQL Bulk Import with JDBC Batch and Disruptor

By switching from a naïve per‑record insert to JDBC batch writes with rewriteBatchedStatements and then off‑loading those batches to multiple consumer threads via a LMAX Disruptor ring buffer, the XML‑to‑MySQL import of 60,000 rows dropped from roughly 300 seconds to about 4 seconds while keeping memory usage modest.

DisruptorJDBCJava
0 likes · 11 min read
Optimizing XML-to-MySQL Bulk Import with JDBC Batch and Disruptor
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 16, 2025 · Databases

Diagnosing ORA-06502 "no data found" Errors When Accessing OceanBase LOBs via JDBC

This article explains why JDBC access to OceanBase (Oracle mode) LOB columns can trigger an ORA-06502 "no data found" error, analyzes the driver’s readFromServer implementation, and shows how disabling the useLobLocatorV2 option eliminates the exception.

DBMS_LOBJDBCLOB
0 likes · 8 min read
Diagnosing ORA-06502 "no data found" Errors When Accessing OceanBase LOBs via JDBC
Zhuanzhuan Tech
Zhuanzhuan Tech
Nov 28, 2024 · Backend Development

Boosting MyBatis-Plus Batch Insert Performance by 2000% with rewriteBatchedStatements and Pre‑Generated IDs

This article explains how to dramatically improve MyBatis-Plus batch insertion speed—up to 2000%—by enabling rewriteBatchedStatements, pre‑generating primary keys to handle foreign‑key relationships, applying proper JDBC batch settings, and using asynchronous multithreaded insertion with optimized connection‑pool and executor configurations.

ID generationJDBCMyBatis-Plus
0 likes · 21 min read
Boosting MyBatis-Plus Batch Insert Performance by 2000% with rewriteBatchedStatements and Pre‑Generated IDs
macrozheng
macrozheng
Oct 25, 2024 · Fundamentals

Why and How Java Breaks the Parent Delegation Model: Real-World Scenarios

This article explains the purpose of Java's parent‑delegation class‑loading mechanism, describes its three built‑in loaders, shows how custom loaders can override it, and explores common situations—such as JNDI, JDBC, Tomcat, and OSGi—where developers intentionally break the delegation for flexibility and modularity.

ClassLoaderCustom ClassLoaderJDBC
0 likes · 11 min read
Why and How Java Breaks the Parent Delegation Model: Real-World Scenarios
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 27, 2024 · Databases

Understanding Repeatable Read in OceanBase Oracle Mode and the Correct JDBC Configuration

This article explains why the OBOracle "set transaction read only" command provides repeatable‑read semantics, evaluates the behavior of the JDBC conn.setReadOnly(true) setting, and shows how to achieve true repeatable‑read isolation by enabling the oracleChangeReadOnlyToRepeatableRead option in the OceanBase client.

JDBCOceanBaseOracle Mode
0 likes · 8 min read
Understanding Repeatable Read in OceanBase Oracle Mode and the Correct JDBC Configuration
Architect's Guide
Architect's Guide
Aug 18, 2024 · Backend Development

Why HikariCP Is So Fast: An In‑Depth Look at Its Design and Implementation

This article explains the core concepts of connection‑pool technology, details the architectural choices behind HikariCP such as dual HikariPool instances, FastList, custom ConcurrentBag, ThreadLocal caching, and byte‑code generation, and walks through the key source code that makes the pool exceptionally fast.

Backend DevelopmentConnection PoolHikariCP
0 likes · 15 min read
Why HikariCP Is So Fast: An In‑Depth Look at Its Design and Implementation
Top Architect
Top Architect
Aug 11, 2024 · Backend Development

Efficient Insertion of 300,000 Records Using MyBatis and JDBC

This article demonstrates how to efficiently insert 300,000 rows into a MySQL table by using MyBatis batch operations, JDBC batch processing, and various performance optimizations such as batch size tuning, transaction management, and connection pooling.

JDBCJavaMyBatis
0 likes · 17 min read
Efficient Insertion of 300,000 Records Using MyBatis and JDBC
Top Architect
Top Architect
Jul 5, 2024 · Databases

Efficient Insertion of 300,000 Records Using MyBatis and JDBC

This article demonstrates how to insert 300,000 rows into a MySQL table efficiently by defining a User entity, configuring MyBatis and JDBC, comparing direct batch insertion, row‑by‑row insertion, and optimized batch strategies with configurable batch sizes and wait times, and provides performance results and best‑practice recommendations.

JDBCJavaMyBatis
0 likes · 15 min read
Efficient Insertion of 300,000 Records Using MyBatis and JDBC
Architect's Tech Stack
Architect's Tech Stack
Apr 29, 2024 · Databases

Performance Evaluation of Inserting Billion-Scale Data into MySQL Using MyBatis, JDBC, and Batch Processing

This article presents a comprehensive performance test of inserting massive amounts of randomly generated person records into MySQL, comparing three strategies—MyBatis lightweight insertion, direct JDBC handling, and JDBC batch processing—both with and without transactions, and concludes that combining batch processing with transactions yields the fastest insertion speed for large‑scale data loads.

JDBCLarge Data InsertionMyBatis
0 likes · 13 min read
Performance Evaluation of Inserting Billion-Scale Data into MySQL Using MyBatis, JDBC, and Batch Processing
Java Tech Enthusiast
Java Tech Enthusiast
Apr 5, 2024 · Databases

Efficient Insertion of 300,000 Records Using MyBatis and JDBC

The article shows how to efficiently load 300,000 MySQL rows in Java by comparing MyBatis and plain-JDBC batch inserts, demonstrating that batching 1,000‑5,000 records per transaction with proper transaction control, connection pooling, and MySQL tuning reduces insertion time from hours to seconds.

JDBCJavaMyBatis
0 likes · 13 min read
Efficient Insertion of 300,000 Records Using MyBatis and JDBC