This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Batch statement execution - regarding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Batch statement execution - regarding" Watch "Batch statement execution - regarding" New topic
Author

Batch statement execution - regarding

PNS Subramanian
Ranch Hand

Joined: Jul 13, 2004
Posts: 150
We use Sybase Adaptive enterprise server.

Is there any limit on the number of sql queries that can be executed using a batch statement ? Would there be a performance hit if the number of queries exceeds a certain value ?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30050
    
149

Originally posted by PNS Subramanian:
Is there any limit on the number of sql queries that can be executed using a batch statement ?

If there is, it is so high that you wouldn't hit it in practice.

Would there be a performance hit if the number of queries exceeds a certain value ?

Yes. We've experienced this on several servers. I think it has to do with memory. We had to experiment to see where the optimal number of queries was.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Batch statement execution - regarding
 
Similar Threads
Bottleneck in DB Tier
prepared or general statement in JDBC
Firing SQLs in Batch to enhance performance
executeBatch of Statement --- jdbc
defference jdbcTemplate.queryForInt() and others