aspose file tools
The moose likes JDBC and the fly likes Updatable resultsets Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Updatable resultsets" Watch "Updatable resultsets" New topic
Author

Updatable resultsets

jayram
Ranch Hand

Joined: Oct 30, 2000
Posts: 94
Can anyone clarify if and how using an updatable resultset is more efficient than firing an update query
Also can we have data from multiple querries in single resultset??
(actually writting a paper which does a feature by feature comparison of java technlologies vs .Net)
Cheers
Jayram
------------------
What if this is as good as it gets ?
Adam Hardy
Ranch Hand

Joined: Oct 09, 2001
Posts: 564
surely it's a question of doing some speed tests and load tests?

I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

It would be very difficult to compare performance of jdbc and .NET products. MS .NET would be easy, you use MS Windows, SQL Server and whatever the database access method is for .NET. This would be difficult for java though. Which database do you use? which jdbc driver do you use? which jdk do you use? which jvm do you use? Do you performance tune? Every time you change any of the variables, the performance will be effected in some way.
About the updateable resultset, I am guessing that it is nowhere near as efficient as a standard SQL update statement
why?
-updateable resultsets have more overhead(in creation and in use)
-updateable resultsets have to read rows in before executing an update
-there are many more steps from the creation to completion of an updateable resultset
-it also seems as more memory is needed to use the updateable resultset(the resultset itself!)
-it also has more calls to the database(executing the select statement, returning the resulset values, then executing the update compared to a standard sql update which has just one call to the database
I don't have any proof to justify the above, but it's just my opinion so don't quote me in your paper!("some guy in javaranch said...")
Jamie
jayram
Ranch Hand

Joined: Oct 30, 2000
Posts: 94
Yeah after scratching my head few times i figured it out myself that updatable resultsets are going to give me worse performance than direct querries
As to .net i am not interested in speed part of it ..i am more interested into features which it does/does not provice. Many of the "cool" stuff in it is already implemented "somewhere" in java just one needs to know where to look for right solution.
Thanks both of u for ur reply
Cheers
Jayram
------------------
What if this is as good as it gets ?
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

If you need to know if java can do something, just ask us and we'll tell you how it is accomplished in java. If you need to know if .NET can do something, we don't care
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Updatable resultsets
 
Similar Threads
issue in converting string to CLOB
Can we extract the data from resultset after the connection get closed.
efficient way to update data
problem with tablemodel
ResultSet is not updateable.