sqlite 避免并发锁库问题

// 启用WAL模式提高并发性能
Connection conn = DriverManager.getConnection("jdbc:sqlite:test.db");
Statement stmt = conn.createStatement();
stmt.execute("PRAGMA journal_mode=WAL");
stmt.execute("PRAGMA synchronous=NORMAL");

 

posted @ 2025-11-13 15:17  liliyou  阅读(2)  评论(0)    收藏  举报