请教各位
请问有人使用过jdbc去连接sqlite吗
因为我发现每次程式一起来, 我去getConnection()这一步
都会很慢, 执行时间最长有到7sec, 不知道有没有前辈欲过类似问题呢?
public Connection getConnection() throws SQLException
{
Connection con = null;
SQLiteConfig config = new SQLiteConfig();
// config.setReadOnly(true);
config.setSharedCache(true);
config.enableRecursiveTriggers(true);
SQLiteDataSource ds = new SQLiteDataSource(config);
ds.setUrl("jdbc:sqlite:config/sample.db");
logger.debug("before getConnection");
con = ds.getConnection();// <