Spring JdbcTemplate and ResultSet is too slow..

Ads
 

Spring JdbcTemplate and ResultSet is too slow..

Hi..

I am using spring jdbctemplate to fetch the records from oracle database.

But it is taking too long time to execute a simple select query. The query which is having 400 records is taking around 12 to 15 seconds. I am using json to retrieve that data.

But if i execute same query in toad, response time is less than 1 second. I am using java jdbcTemplate.query(sql, params, RowMapper object) and each record will have only 4 values.

I tried in following ways:

  • using simpleJdbcTemplate object
  • plain statement object
  • changing driver class from BasicDataSource to c3po in bean configuration.

But i cant able to reduce the response time to 2 seconds less atleast.

Please help which will be greatly appreciated...

Thank you.

View Answers

December 31, 2010 at 6:42 PM

Hi,

Try to create indexes on your tables. I think your database table does not contains required indexes.

Thanks


January 7, 2011 at 6:48 PM

Thanks for your reply. It resolved now. Because database and application are different servers.

Ads









Related Tutorials/Questions & Answers:
Spring JdbcTemplate and ResultSet is too slow..
Spring JdbcTemplate and ResultSet is too slow..  Hi.. I am using spring jdbctemplate to fetch the records from oracle database. But it is taking too long time to execute a simple select query. The query which is having 400
What is Spring's JdbcTemplate ?
What is Spring's JdbcTemplate ?  Hi, What is Spring's JdbcTemplate ? Thanks
Advertisements
ResultSet
ResultSet  I want to retrieve data of unknown datatype from database.how to do it using resultset or Resultsetmetadata.Can you please tell me what... = con.createStatement(); ResultSet rs = st.executeQuery
JDBCTemplate BatchUpdate() example not working
JDBCTemplate BatchUpdate() example not working  Hi, I tried the JDBCTemplate BatchUpdate example, with IBM DB2 database. I updated the dataSource bean values accordingly. When I try, the program runs fine, however the database
multiple resultset in one resultset
multiple resultset in one resultset  how to retrive multiple resultsets in one resultset in java.? plz help
ModuleNotFoundError: No module named 'slow'
ModuleNotFoundError: No module named 'slow'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'slow' How to remove the ModuleNotFoundError: No module named 'slow' error
ModuleNotFoundError: No module named 'slow'
ModuleNotFoundError: No module named 'slow'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'slow' How to remove the ModuleNotFoundError: No module named 'slow' error
Spring Batch Example
about  batchUpdate()  method of class JdbcTemplate in Spring framework... Spring Batch Example      ...://www.springframework.org/schema/beans/spring-beans-2.0.xsd http
resultset metadta
resultset metadta  import java.sql.Connection; import... Employee Details Using resultset metadata: "); Connection con = null...(); ResultSet rs = st.executeQuery("SELECT * FROM employee
ModuleNotFoundError: No module named 'MarkupSafe-slow'
ModuleNotFoundError: No module named 'MarkupSafe-slow'  Hi, My... named 'MarkupSafe-slow' How to remove the ModuleNotFoundError: No module named 'MarkupSafe-slow' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'too'
ModuleNotFoundError: No module named 'too'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'too' How to remove the ModuleNotFoundError: No module named 'too' error
ModuleNotFoundError: No module named 'too'
ModuleNotFoundError: No module named 'too'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'too' How to remove the ModuleNotFoundError: No module named 'too' error
SQL function extremely slow from 5.5
SQL function extremely slow from 5.5  SQL function extremely slow from 5.5
Resultset - JSP-Servlet
Resultset  I am writing while(rs.next){} but if resultset is null then it cannot enter in while block. I want,if resultset is null then it will enter into the while block.  Hi friend, A ResultSet object
ModuleNotFoundError: No module named 'django-slow-log'
ModuleNotFoundError: No module named 'django-slow-log'  Hi, My... named 'django-slow-log' How to remove the ModuleNotFoundError: No module named 'django-slow-log' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-slow-log'
ModuleNotFoundError: No module named 'django-slow-log'  Hi, My... named 'django-slow-log' How to remove the ModuleNotFoundError: No module named 'django-slow-log' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-slow-log'
ModuleNotFoundError: No module named 'django-slow-log'  Hi, My... named 'django-slow-log' How to remove the ModuleNotFoundError: No module named 'django-slow-log' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'odoo12-addon-slow-statement-logger'
ModuleNotFoundError: No module named 'odoo12-addon-slow-statement-logger' ...: ModuleNotFoundError: No module named 'odoo12-addon-slow-statement-logger' How to remove the ModuleNotFoundError: No module named 'odoo12-addon-slow-statement-logger
ModuleNotFoundError: No module named 'odoo12-addon-slow-statement-logger'
ModuleNotFoundError: No module named 'odoo12-addon-slow-statement-logger' ...: ModuleNotFoundError: No module named 'odoo12-addon-slow-statement-logger' How to remove the ModuleNotFoundError: No module named 'odoo12-addon-slow-statement-logger
ModuleNotFoundError: No module named 'slow-motion-mein'
ModuleNotFoundError: No module named 'slow-motion-mein'  Hi, My... named 'slow-motion-mein' How to remove the ModuleNotFoundError: No module named 'slow-motion-mein' error? Thanks   Hi, In your
SQL exception, Exhausted ResultSet
SQL exception, Exhausted ResultSet  javax.servlet.ServletException: java.sql.SQLException: Exhausted Resultset iam getting this error messege whenever i run my code. what would be the possible reasons
JTable populate with resultset.
JTable populate with resultset.  How to diplay data of resultset...) JTable(Vector data, Vector columneNames) Here is a JTable populate with resultset...(); ResultSet resultSet = statement.executeQuery(sql
Resultset Issue in SQL
Resultset Issue in SQL  when i call rs.next() in my code it is returning false, though im having valid query to execute and fetch a row from database.how can i resolve this issue. My code is: SELECT JOBDESCRIPTION,CATEGORY
Resultset with one to many relationship
Resultset with one to many relationship   Suppose there are 5 tables in database named A,B,C,D and E. A has one to many relationship with B,C,D and D... populate my bean classes from resultset without using hibernate, so
Are there too many data scientists?
Are there too many data scientists?  Hi, I am beginner in Data...: Are there too many data scientists? Try to provide me good examples or tutorials links so that I can learn the topic "Are there too many data scientists
Is it too late to start coding?
Is it too late to start coding?  Hi, I am beginner in Data Science...: Is it too late to start coding? Try to provide me good examples or tutorials links so that I can learn the topic "Is it too late to start coding?". Also
ResultSet In Java
ResultSet In Java In this section we will learn about the ResultSet in Java... that are mostly used in to get the value. ResultSet contains the data of a table after executing the SQL queries. Object of ResultSet also maintains the current position
ModuleNotFoundError: No module named 'ar_too'
ModuleNotFoundError: No module named 'ar_too'  Hi, My Python..._too' How to remove the ModuleNotFoundError: No module named 'ar_too'... to install padas library. You can install ar_too python with following command
ModuleNotFoundError: No module named 'ar_too'
ModuleNotFoundError: No module named 'ar_too'  Hi, My Python..._too' How to remove the ModuleNotFoundError: No module named 'ar_too'... to install padas library. You can install ar_too python with following command
ModuleNotFoundError: No module named 'ar_too'
ModuleNotFoundError: No module named 'ar_too'  Hi, My Python..._too' How to remove the ModuleNotFoundError: No module named 'ar_too'... to install padas library. You can install ar_too python with following command
ModuleNotFoundError: No module named 'ar_too'
ModuleNotFoundError: No module named 'ar_too'  Hi, My Python..._too' How to remove the ModuleNotFoundError: No module named 'ar_too'... to install padas library. You can install ar_too python with following command

Ads