473,394 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

WRITELOG lock on databases set to SIMPLE recovery

Hi All,
I have a 2MB database set to SIMPLE recovery. This database is used
only to generate new keys to web users. It has two columns - UID and
LASTDATE. The UID column is only updated when users log in or log out
(INSERT & DELETE). The LASTDATE column is updated every time they
switch between pages.

Please don't ask for the reason why we do it this way, it just IS.

The maximum amount of rows in this table at any given time is about
2000. There is a non-clustered index on the UID column.

My problem is that all throughout the day I have constant blocks by the
WRITELOG waittype. I know my disk I/O is very slow (will be upgraded
soon) but this is the only database on which these blocks occur. What
is writing to the transaction log if I have the DB set for SIMPLE
recovery?

Thanks,
Josh

Jul 23 '05 #1
4 3584
joshsackett (jo*********@gmail.com) writes:
My problem is that all throughout the day I have constant blocks by the
WRITELOG waittype. I know my disk I/O is very slow (will be upgraded
soon) but this is the only database on which these blocks occur. What
is writing to the transaction log if I have the DB set for SIMPLE
recovery?


Simple recovery is not the same as no recovery. SQL Server always
writes to the transaction. It first write to the transaction log,
and later to the data tables. The point is that if the server
crashes before the data is written to the table, the transaction
can be rolled forward, if commit record was written. Else the
transaction will be rolled back.

The difference to full and bulk-logged recovery, is that in simple
recovery, SQL Server will automatically truncate the transaction
log every now and then. But truncation is never past the point of
the oldest open transaction.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2
joshsackett (jo*********@gmail.com) writes:
My problem is that all throughout the day I have constant blocks by the
WRITELOG waittype. I know my disk I/O is very slow (will be upgraded
soon) but this is the only database on which these blocks occur. What
is writing to the transaction log if I have the DB set for SIMPLE
recovery?


Simple recovery is not the same as no recovery. SQL Server always
writes to the transaction. It first write to the transaction log,
and later to the data tables. The point is that if the server
crashes before the data is written to the table, the transaction
can be rolled forward, if commit record was written. Else the
transaction will be rolled back.

The difference to full and bulk-logged recovery, is that in simple
recovery, SQL Server will automatically truncate the transaction
log every now and then. But truncation is never past the point of
the oldest open transaction.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #3
Thanks Erland, I appreciate the help. I reexamined the application and
found that it writes an XML output to the table as well every time a
user changes the page. So my 2000 row table is actually about 6MB in
size and is constantly writing large chunks of data. The 31MB
transaction log gets to about 80% full and then flushes.

I suppose my only recourse is to get the faster disk system in.

Thanks again,
Josh

Jul 23 '05 #4
Thanks Erland, I appreciate the help. I reexamined the application and
found that it writes an XML output to the table as well every time a
user changes the page. So my 2000 row table is actually about 6MB in
size and is constantly writing large chunks of data. The 31MB
transaction log gets to about 80% full and then flushes.

I suppose my only recourse is to get the faster disk system in.

Thanks again,
Josh

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Andrew Baker | last post by:
What is the best way to lock an individual row in the following scenerio: --TODO - LOCK THIS ROW -- Return the next id SELECT next_id INTO next_id_out FROM owner.my_id_table WHERE app_id =...
0
by: BobC | last post by:
One of Microsoft's VB code samples is a solution called Logger (or WinLogger). It has a file associated with the "Logging" project called ILog.vb. In the module, interface or whatever it's called...
3
by: RugbyCoach | last post by:
I'm looking for a tool that can extract only the schema from a database in a form that can be used to generate that schema in another empty database. This is to facilitate our disaster recovery...
2
by: Trent | last post by:
Hello, all. I have the following production DB2 environment. DB2 8.1.4 (fp4) WG edition with 2 production databases on Windows 2003 standard edition. My first question is regard with...
8
by: Roy Padgett | last post by:
I have a combo box where users select the customer name and can either go to the customer's info or open a list of the customer's orders. The RowSource for the combo box was a simple pass-through...
1
by: com | last post by:
Extreme Web Reports 2005 - Soft30.com The wizard scans the specified MS Access database and records information such as report names, parameters and subqueries. ......
6
by: Marek Wierzbicki | last post by:
Hi In my server (MSSQL 2000 sp4) very often I see long time of executing query with waittype=WRITELOG Recovery is set to SIMPLE and there is no autoShrink. Auto increment file size (log) is...
3
by: peterc | last post by:
I have an existing database with approx 500,000 rows and accessed by a few hundred users per day creating approx 1,000 new records per day plus typical reporting - relatively low volume stuff for...
7
by: Troels Arvin | last post by:
Hello, Some users are frustrated by DB2 locking their database operations (most recently: a table drop took forever, probably because of a lock). The natural and sane question I'm being asked:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.