批量添加数据库

xiaoxiao2025-12-02  5

http://www.51.la/report/1_main.asp?id=1 统计流量的网页 http://blog.sina.com.cn/s/blog_59befbb60100ab01.html spring定时网页 select count(*) from APPLY_OPEN a where to_char(a.add_date,'yyyy-MM-dd') = (select to_char (sysdate,'yyyy-MM-dd') from dual) select count(*) from APPLY_OPEN a where to_char(a.add_date,'yyyy-MM') = (select to_char (sysdate,'yyyy-MM') from dual) select count(*) from APPLY_OPEN a where to_char(a.add_date,'yyyy') = (select to_char (sysdate,'yyyy') from dual) Session session = sessionFactory.openSession(); Transaction tx = session.beginTransaction(); for ( int i=0; i<100000; i++ ) { Customer customer = new Customer(.....); session.save(customer); if ( i % 20 == 0 ) { //20,与JDBC批量设置相同 //将本批插入的对象立即写入数据库并释放内存 session.flush(); session.clear(); } } tx.commit(); session.close(); 相关资源:批量附加SQL数据库工具V3.2
转载请注明原文地址: https://www.6miu.com/read-5040202.html

最新回复(0)