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


Win a copy of Spring in Action this week in the Spring forum!
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: 272
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
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3710
    
    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: 272
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: 18662
    
    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".
 
 
subject: Is there a limit on the number of sql statements in a single transaction?