performance « Operation « Java Database Q&A





1. Insert fail then update OR Load and then decide if insert or update    stackoverflow.com

I have a webservice in java that receives a list of information to be inserted or updated in a database. I don't know which one is to insert or update. Which one ...

2. Efficient Multiple SQL insertion    stackoverflow.com

Hey guys, What is the best/most time efficient way to insert 1000 rows into one table (jdbc/connector-mysql database)? (it is a buffer and need to be dumped into the database everytime it ...

3. Efficient way to do batch INSERTS with JDBC    stackoverflow.com

In my app I need to do a lot of INSERTS. Its a Java app and I am using plain JDBC to execute the queries. The DB being Oracle. I have ...

4. How to improve the select query performance in Java?    stackoverflow.com

I am using BerkeleyDB Database and I am performing select query that require 409 ms. How to improve the select query performance? I am using the following code:

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import ...

5. SQL performance: Is UPDATE faster than INSERT    stackoverflow.com

I must do 10,000 INSERTs, then 10,000 UPDATEs on the inserted rows. I am wondering whether UPDATE in SQL is faster than INSERT or not. Normal simple table with 30 ...

6. JDBC batch insert being SLOW! I mean, REALLY SLOW?    stackoverflow.com

Here's the deal:

  1. I create a connection conn using the DriverManager
  2. I set conn.autoCommit(false);
  3. Then I have PreparedStatement pStat = conn.prepareStatement(insert_string_with_parameter);
  4. I set several parameters with pStat.set... then I add the batch with pStat.addBatch();
  5. Every 10000 ...

7. How can I improve the performance of database updates from Java?    stackoverflow.com

I currently have a Java thread to update the database once every few seconds. The database is MSSQL 2005, Java version is 6.0. There are approximately 800 updates every time. So what ...

8. Performance Issues with database insert !!    coderanch.com

Hi guys ! Problem Statement : I have a flat file containing around 1300 rows with each row having 16 columns. In total all these columns map to 5 tables in my database. I have to write a program which reads this file and loads the data in appropriate columns within the relevant tables. I tried using createStatement...it seems to be ...

9. Performance meseaurement of code conatining queries    coderanch.com

Hi, I would like to know if there are any methods to get the timeofday() (C eqivalent routine) in Java. I wanted to calculate time taken for execution of certain part of my code and was not sure how to do it .This part of code mainly has queries which query the Mysql DB using MySQL JDBC connection. I thought I ...





10. Performance for batch update    coderanch.com

11. fast performance in jdbc insert    coderanch.com

Hi, I want to insert some 1 to 10 million records in oracle database.I am using connection pool and prepared statement for this purpose.I have 3 different types of objects and data from them is inserted to 3 tables in database.I am making a batch of 200 for each query(3 total) and i am getting 4000 ms as total time to ...

12. Bad Performance for JDBC Insert    coderanch.com

Hello, I'm programming a tool which for test purposes fills a database with dummy data. I use a JDBC driver. I aim to insert about 1.000.000 datasets but right now it's taking too long altough my routine is very small. for (int i= 0 ; i < numberOfJoins ; i ++) { RandomGUID myGUID = new RandomGUID(); statement.setString( 1, myGUID.toString()); statement.setString( ...

13. Performance hit using "where" clause in the query    coderanch.com

Hi All, I am facing a huge performance hit in the java code when using "where" clause in queries. Following are the details: 1. SELECT * FROM Employee 2. SELECT * FROM Employee where employeeid in (26,200,330,571,618,945) There is no difference in Query Execution Time for both queries. Business Logic Time is huge in second case as compared to first one ...

14. Query giving slow performance.    coderanch.com

hi everybody i am using this(below) SQL query for searching some data but as i have used some joins and there are huge number of records it is giving me performance problem so can any body help me how can i optimize this query..every response is highly appreciated.. if i am searching a then this will be the query select DISTINCT ...

15. Do I get better performance from running a query once a day and saving the info in an object?    coderanch.com

I inherited an application which opens to the public every february. During this february I was having up to 300 concurrent users acessing in less than a minute. I used up 60% of the cpu on a shared server and database connectivity was slooooooowwwwwwwww,aside from increasing the connection pool I would like to visit the database less often. Instead of going ...





17. Poor performance inserting data postgree database using Web Service    forums.oracle.com

Hi, I made a java application to insert data into a postgree database using jdbc driver. Then I code that app to a web service (glassfish v2) using the same driver, and when I run the web service it takes 10 times more to insert the that in the database than the java app. Java App - 4490ms WS - 49203ms ...

18. Java code vs database query performance ?????    forums.oracle.com

I think now, reply to first question truly force me to ask heap related problem. But i am thinking its not good idea to ask related question in this post. By the way : second question is : how can i insert dataset more than 50K rows into xls sheet. So far i know two methods 1 - extend java heap ...