Click here to Skip to main content
16,005,697 members
Home / Discussions / Database
   

Database

 
GeneralRe: saving tables that are generated by queries as HTML file or sub-tables Pin
Eric Dahlvang18-Oct-06 3:09
Eric Dahlvang18-Oct-06 3:09 
GeneralRe: saving tables that are generated by queries as HTML file or sub-tables Pin
miamikk18-Oct-06 4:10
miamikk18-Oct-06 4:10 
GeneralRe: saving tables that are generated by queries as HTML file or sub-tables Pin
Eric Dahlvang18-Oct-06 5:02
Eric Dahlvang18-Oct-06 5:02 
GeneralRe: saving tables that are generated by queries as HTML file or sub-tables Pin
Michael Potter18-Oct-06 3:34
Michael Potter18-Oct-06 3:34 
GeneralRe: saving tables that are generated by queries as HTML file or sub-tables Pin
miamikk18-Oct-06 4:16
miamikk18-Oct-06 4:16 
GeneralRe: saving tables that are generated by queries as HTML file or sub-tables Pin
Michael Potter18-Oct-06 4:46
Michael Potter18-Oct-06 4:46 
QuestionClearing the LOG file ?!! Pin
devboycpp17-Oct-06 8:18
devboycpp17-Oct-06 8:18 
AnswerRe: Clearing the LOG file ?!! Pin
Mike Dimmick17-Oct-06 11:37
Mike Dimmick17-Oct-06 11:37 
If you're talking about your transaction log, the only supported way of clearing it is to back it up. Space taken by committed transactions in the log will then be marked as reusable. The log will then reuse that space.

You should perhaps consider which Recovery Model you are using. The Full recovery model is generally recommended for any production system - it permits you to recover to the point of failure if the database files become corrupted or unavailable but you have a full backup and the transaction log is still OK. It also permits you to roll back to any point in time. The Simple recovery model only allows you to restore a full backup; you cannot make transaction log backups.

To reduce the size of the files, use the Shrink Database feature. You will probably need to select the 'Move pages to beginning of file' option to actually have much effect, since the pages that are most likely to be in use straight after doing this will be those at the end of the file.

All that said, a large transaction log does not generally cause a slowdown - SQL Server simply writes to the end of it, expanding the file if necessary. If the disk is starting to get full, the OS may be struggling to find free space for it to expand to. Best practice on a production server is for the transaction log to live on a drive (preferably a RAID 1 [mirrored] array of drives, for redundancy) separately from everything else. This prevents the drive heads from having to seek away from the current write position in the transaction log - log accesses are predominantly sequential-write except when a rollback occurs.

Another common reason for slowdowns as the amount of data increases is simply that your queries and indexes are poorly designed. Most likely one or more tables is having to be scanned - read from beginning to end - rather than using an index to find the rows required. This operation scales more-or-less linearly with the size of the table, getting progressively slower as you add more data. You should always have a representative amount of data in your database when performing pre-production tests, to ensure you catch these problems early.

Stability. What an interesting concept. -- Chris Maunder

QuestionSelect statement on Cursor Pin
Jens Meyer17-Oct-06 4:27
Jens Meyer17-Oct-06 4:27 
AnswerRe: Access or SQL Express?? Pin
Jim Conigliaro17-Oct-06 4:26
Jim Conigliaro17-Oct-06 4:26 
AnswerRe: Access or SQL Express?? Pin
stevehnsn17-Oct-06 15:53
stevehnsn17-Oct-06 15:53 
QuestionAccess or SQL Express?? Pin
quinton.nel17-Oct-06 0:25
quinton.nel17-Oct-06 0:25 
AnswerRe: Access or SQL Express?? Pin
Colin Angus Mackay17-Oct-06 0:59
Colin Angus Mackay17-Oct-06 0:59 
GeneralRe: Access or SQL Express?? Pin
quinton.nel17-Oct-06 1:21
quinton.nel17-Oct-06 1:21 
GeneralRe: Access or SQL Express?? Pin
Jerry Hammond18-Oct-06 4:13
Jerry Hammond18-Oct-06 4:13 
QuestionBrackets around column names? Pin
quinton.nel16-Oct-06 23:47
quinton.nel16-Oct-06 23:47 
AnswerRe: Brackets around column names? Pin
Mike Dimmick17-Oct-06 0:14
Mike Dimmick17-Oct-06 0:14 
AnswerRe: Brackets around column names? Pin
albCode17-Oct-06 0:15
albCode17-Oct-06 0:15 
GeneralRe: Brackets around column names? Pin
stevehnsn17-Oct-06 16:03
stevehnsn17-Oct-06 16:03 
QuestionError Upon Restoring Transaction Log Pin
toink toink16-Oct-06 20:19
toink toink16-Oct-06 20:19 
AnswerRe: Error Upon Restoring Transaction Log Pin
Mike Dimmick17-Oct-06 0:15
Mike Dimmick17-Oct-06 0:15 
QuestionSQl INNER JOIN ON 5 tables Pin
walalawll16-Oct-06 16:05
walalawll16-Oct-06 16:05 
AnswerRe: SQl INNER JOIN ON 5 tables Pin
walalawll16-Oct-06 16:36
walalawll16-Oct-06 16:36 
Questionhow to insert image into sql database table Pin
vrk_raju16-Oct-06 15:01
vrk_raju16-Oct-06 15:01 
AnswerRe: how to insert image into sql database table Pin
Colin Angus Mackay16-Oct-06 21:42
Colin Angus Mackay16-Oct-06 21:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.