JRMC JDK 和 Sun JDK JDBC性能相差不小呵,意外ing

贴图

贴代码

 

                        long sysms = System.currentTimeMillis();
			ResultSet rs = stmt.executeQuery(sql);
			long sysmsEnd = System.currentTimeMillis();
			
			ResultSetMetaData rsmt = rs.getMetaData();
			int cols = rsmt.getColumnCount();
			
			List<Map<String,Object>> list = new ArrayList<Map<String,Object>>();
			while(rs.next()){
				Map<String, Object> map = new HashMap<String, Object>();
				for(int i=1;i<=cols;i++){
					map.put(rsmt.getColumnName(i), rs.getObject(i));
				}
				list.add(map);
			}
			long sysmsEnd2 = System.currentTimeMillis();

 

java -Xms128M -Xmx256M -cp ../lib/ojdbc14.jar:. test.Conn

 

T2370

Windows - XP SP3

JR : CPU 10 - 40%
     Mem 150M
    java version "1.6.0_14" (Mission Control)

HS : CPU 10 - 20%
     Mem 130M
    java version "1.6.0_13"
   

Linux - Ubuntu8.04

JR : CPU 20 - 30%
     Mem 130M
    java version "1.6.0_14" (Mission Control)

HS : CPU 10 - 20%
     Mem 100M
    java version "1.6.0_13"   

 

 

 

 

你可能感兴趣的:(java,jdk,jdbc,XP,sun)