Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Which is better ? Billing System

Author  Topic 

mary_itohan
Posting Yak Master

191 Posts

Posted - 2008-08-01 : 05:02:06
hello,
I have a billing system that has a choice of two options.

When a user purchases multi products. It does a billing.

Multi products are in a csv format, passed to the db, which identifies the price of the products and

1. Makes a log/history of the products
2. Updates the users credtis

PROBLEM
This billing platform is quite a busy system. So am wondering which is better to use

1. Calculate the total bill before billing and

- Make a log/history of products
- Update the credits table ( With the total sum ) JUST ONCE

ie 1,000 inserts into the history table and 1 update to the credit table

or

2. Make a log/history of products
- update at each history is inserted ( MULTIPLE UPDATES )
ie 1,000 inserts into the history table and 1,000 update to the credit table



Hope this is clear
thanks

M





Yes O !
   

- Advertisement -