aspose file tools*
The moose likes JDBC and the fly likes Is there a limit on the number of sql statements in a single transaction? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Is there a limit on the number of sql statements in a single transaction?" Watch "Is there a limit on the number of sql statements in a single transaction?" New topic
Author

Is there a limit on the number of sql statements in a single transaction?

Tom Griffith
Ranch Hand

Joined: Aug 06, 2004
Posts: 257
Hello. I'm looking to insert a large set of data into a primary table but then n number of data subsets related to the primary data into a secondary table. Are there any known limits on the number of SQL inserts allowed if i wrap it all into a single transaction? Thank you.
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3697
    
    5

The only limit would be the size of the memory available to the application and database server.


My Blog: Down Home Country Coding with Scott Selikoff
Tom Griffith
Ranch Hand

Joined: Aug 06, 2004
Posts: 257
thanks a lot...the n is going to be a finite number but an open-ended transaction like this makes me skiddish.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18135
    
    8

I have used transactions which contain several thousand records with SQL Server. But why don't you try out your proposed application with your proposed database to see what actually happens? It's called "stress testing".
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there a limit on the number of sql statements in a single transaction?
 
Similar Threads
How can we access praimary key in Entity Beans -BMP?
Creating multiple tables at once
jdbc question
Best way to generate PK in EJB
How to delete duplicate rows