Hi, Currently i facing a perfomance problem,
i did a login access which access to db2 to retrive the user data according to chapter 11 of spring tutorial, but the Return is kind of slow, i dun know wat happen, any 1 can help me?
Belowis the log File:
As You Can see, there is around 2min to get the result Set.Code:2007-08-17 09:58:33,926 INFO [login.LoginDaoJdbc] - Before 2007-08-17 09:58:33,942 DEBUG [org.springframework.jdbc.core.JdbcTemplate] - Executing SQL query [select WUSER_ID, USER_LOGIN, USER_NAME, NRIC, WACCESS_GROUP, CREATED_BY, DATE_CREATED, PASSWORD, IS_LOGIN, LAST_LOGIN, ALLOW_DEL, IS_PASSWORD_CHANGE,STATUS_ID, ALLOW_DEL, IS_LOCK from PTB.TBL_WUSER where USER_LOGIN=? and PASSWORD=?] 2007-08-17 09:58:33,942 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - Fetching JDBC Connection from DataSource 2007-08-17 09:58:33,942 DEBUG [org.springframework.jdbc.datasource.DriverManagerDataSource] - Creating new JDBC Connection to [jdbc:odbc:FNAIMS] 2007-08-17 10:00:08,842 DEBUG [org.springframework.jdbc.core.StatementCreatorUtils] - Setting SQL statement parameter value: column index 1, parameter value [admin], value class [java.lang.String], SQL type unknown 2007-08-17 10:00:09,358 DEBUG [org.springframework.jdbc.core.StatementCreatorUtils] - Setting SQL statement parameter value: column index 2, parameter value [admin], value class [java.lang.String], SQL type unknown 2007-08-17 10:00:23,853 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - Returning JDBC Connection to DataSource 2007-08-17 10:00:43,353 INFO [login.LoginDaoJdbc] - After
My Query Code:
My Machinse is penium4 2.8 ghz with 1 g of ram.Code:public Object getUser(String user_login, String password) { log.info(user_login + " " + password); JdbcTemplate jt = new JdbcTemplate(ds); log.info("Before"); User user= (User) jt.queryForObject( "select * from User where LOGIN=? and PASSWORD=?", new Object[] {user_login, password}, new RowMapper(){ public Object mapRow(ResultSet rs, int rowNum) throws SQLException{ /* setter method here */ } }); log.info("After"); return user; }
I am using netBeans and run db2 locally.


Reply With Quote
