Fetch « Record « Java Database Q&A





2. Record Pre Fetch Size    coderanch.com

1.What is the advantage of using Record Prefetch size? 2. At what situation we can use this option? Case study: Consider that I am using Weblogic / Servlets in the application. The default prefetch size is 10. And let say that the number of records available in the table is 100. So if i want to get the 100 Records, how ...

3. how to fetch some records at a time    coderanch.com

4. fetching records page/page    coderanch.com

Originally posted by suresh rg: Hi Suppose a query fetches some 20000 records from DB & the client displays the results just 10 records per page, How big is the resultset. In ASP we have a provision for fetching the results page by page to reduce the overhead on the server. Do we have anything in JDBC to send results page/page ...

5. Fetching nK records in batch from client side?    coderanch.com

Hi, I have an application that can fetch a few thousand records from a few million records table. The query is build dynamicaly and tuned to the near max (indexes and so on). Handling the records on the client side is not an issue. The bottleneck when this scenario occurs is the execution time of this query which is exponential with ...

6. Fetching 50000 records using JDBC.    coderanch.com

Why do you think you have to do it in batches of 50 records? Why not just a loop like this: PrintWriter pw = new PrintWriter(new FileOutputStream("result.txt")); ResultSet rs = statement.executeQuery("SELECT ..."); while (rs.next()) { String field1 = rs.getString(1); ... // Print record to output file in the format you want pw.println(field1 + ...); } rs.close(); pw.flush(); pw.close(); ResultSet does not ...

7. Problem in fetching records    coderanch.com

Hi, I have a table with two columns: loginID and PhoneNo. There can be many phone no's associated with one login ID and there will be one row each for a loginID,Phone No pair.... Now, if i select all the records from the table, there may be different rows with same loginID. Is there any possible SQL query that gives me ...

8. how to fetch 50 million records from a database    coderanch.com

IMO Connection pooling is only to manage connections to improve scalability. The idea is to fetch part of the query result at a given time (not entire 50 million records) and show it to the user (Lets say 100 records per page). This will occupy less memory when compared to 50 million records.(Anycase the user will not view all the 50 ...

9. Fetching Records From Database    coderanch.com





10. fetch data at a given record    coderanch.com

This might not be the best approach. The call to PreparedStatement.execute() might actually retrieve a number of records from the database and buffer them, at which point you ask for only one record. This wastes the database's time and network bandwidth. Most databases provide SQL syntax to limit the results return for a query - you would be better off using ...