GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Database  >  SQL Server
Go To First  |  Previous Question  |  Next Question 
 SQL Server  |  Question 76 of 94    Print  
Efficient way of Committing transactions
If I have 10 statements, individually committing each statement is efficient or doing a bulk commit of all the 10 statements at the end is efficient.

Also if we say one of them is efficient... is it efficient in space or time or cpu?

Thanks,
rbala_sjsu



  
Total Answers and Comments: 1 Last Update: December 14, 2007     Asked by: rbala_sjsu 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: debasis.yours
 
There is a trade-off in this case. In case of transaction-oriented scenario, I think executing 10 statements separately would be a better option since it will hold the lock for a very short duration allowing other processes to access the resource. But in case of a database with mainly static data, I would go for the other option i.e. to batch-execute all the statements as a single atomic transaction

Above answer was rated as good by the following members:
neel_desai
December 14, 2007 04:24:41   #1  
debasis.yours Member Since: November 2007   Contribution: 11    

RE: Efficient way of Committing transactions
There is a trade-off in this case. In case of transaction-oriented scenario, I think executing 10 statements separately would be a better option since it will hold the lock for a very short duration allowing other processes to access the resource. But in case of a database with mainly static data, I would go for the other option i.e. to batch-execute all the statements as a single atomic transaction
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    

 Related Questions

1. Types of Triggers in Oracle 2. Can we relate two different tables from two different users in ORACLE,PL/SQL? 3. How can I combine sequence with select statement which is used in another insert statement. i.e.Insert 4. if records are inserted into table without committing.How to refer to these values in a procedure? 5. when we need to use USING clause in the sql?For example in this below:SELECT emp_name, department_name
Read Answers (1) | Asked by : lavanya

Your 600GB database exists across 3 database files, each 200GB in size. It takes 12 hours to perform a full database backup. You decide to implement the following backup strategy : Full backup : 9am SundayFile 1 backup : 8pm Monday eveningFile 2 backup : 8pm Tuesday eveningFile 3 backup : 8pm Wednesday eveningFile 1 backup : 8pm Thursday eveningFile 2 backup : 8pm Friday eveningFile 3 backup : 8pm Saturday eveningTransaction log backups : Hourly, every day.DB suffers critical failure
Tags : Backup, Restore

If I have 10 statements, individually committing each statement is efficient or doing a bulk commit of all the 10 statements at the end is efficient.Also if we say one of them is efficient... is it efficient 
Latest Answer : There is a trade-off in this case. In case of transaction-oriented scenario, I think executing 10 statements separately would be a better option since it will hold the lock for a very short duration allowing other processes to access the resource. But ...

What is a transaction isolation level and What is the advantage of it? What are different options that we set for a transaction isolation level? Transaction isolation levels are used when we go for 
Latest Answer : You need to add Snapshot to this answer.  From BOL:Specifies that data read by any statement in a transaction will be the transactionally consistent version of the data that existed at the start of the transaction. The transaction can only recognize ...


 Sponsored Links

 
Related Articles

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

Performing XSLT Transformations inside the Database

Performing XSLT Transformations inside the Database Now that you have the employees XSL stylesheet stored in the database and the xmlusr schema is permitted to access the hr employees table you can create a script that will instruct the database to build an HTML page based on the data stored in hr e
 

Moving All the XML Processing into the Database

Moving All the XML Processing into the Database In the preceding example the database server performs only a part of the XML processing while the rest is still performed by the PHP engine Specifically the database server generates an employees XML document based on the records from the hr employees
 

Performing XML Processing inside the Database

Performing XML Processing inside the Database When building XML enabled applications on top of Oracle there are many advantages to performing the XML processing inside the database when compared to performing it on the client The key advantages to perform XML processing inside the database are as fo
 

SQL Server 2005 Integration Services Review

SQL Server 2005 Integration Services using Visual Studio 2005 A Beginner s Guide SQL Server 2005 A offering of Microsoft Corporation for database management the SQL server 2005 is one of the powerful database management systems in the world Available for integration in almost any system that uses Mi
 

SQL Server Integration Services

SQL Server Integration Services Here is a sample chapter from Beginners Guide to SQL Server Integration Services Using Visual Studio 2005 by Jayaram Krishnaswamy Environment set up for Visual Studio 2005 with respect to SSIS and multiple tasking Connecting to Microsoft Access Text Files Excel S
 

Web Server

Web Server A web server can be a program or the computer itself which receives the requests from various other browsers and responds to those requests These requests are all requests that are being sent for some documents There are two kinds of web servers available The web server program and the
 

Client-Server Models and N-Tier Applications

Client Server Models and N Tier Applications One of principal objective of Client Server methods is to provide data to an end user However Client Server architectural methodologies are much more complex Client Server describes the process wherein a client program generates contact with a separate se
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape