Tuesday, March 27, 2012

do log files also store select statement?

do log files also store select statement?Do they store any info wrt indexes. If I had clustered and non clustered
indexes , does the tran log backup files hold any info about the indexes.
Will i see reduced size in log file backups if i drop the indexes
"Ray Higdon" <rayhigdon@.higdonconsulting.com> wrote in message
news:08bc01c35c85$9fdf4080$a301280a@.phx.gbl...
> Nope. You can not rollback a select statement and it is
> not a transaction. TO see the current log you can issue
> select * from ::fn_dblog(null,null)
> HTH
> Ray Higdon MCSE, MCDBA, CCNA
> >--Original Message--
> >
> >
> >.
> >|||Hassan
The transaction logs capture all changes to your database,
as Ray said they don't record selects (except select into)
because they don't change the database.
When you insert, update or delete as well as making
changes to the data you can be making changes to the
indexes. So yes by dropping indexes (although the drop
will by caught by the log), you will reduce your logging a
small amount.
However indexes are usually there to aid performance, I
would be very careful about droping indexes to keep the
log smaller. The impact on your system is likely to be
higher than the small saving in log space. I would not
advise it unless you perform a very good audit of your
indexes and find that some are not being used.
If you are having problems with your log size, you may be
better off with performing transaction log backups more
often.
Hope this helps
John

No comments:

Post a Comment