Showing posts with label statistics. Show all posts
Showing posts with label statistics. Show all posts

Friday, March 30, 2012

read-ahead reads in SQL Server 2005

Hi,

I would like to describe what is meant by "read-ahead reads" after having set "set statistics io on;".

Do you know where I could find information about it which is valid for SQL Server 2005? In MSDN and Google, I just found information for older versions of SQL Server.

Is this source http://www.microsoft.com/technet/prodtechnol/sql/70/reskit/part4/sqc05.mspx - which explaines quite well what I need - still valid for SQL Server 2005?

Thanks for help,

Ina

Read ahead reads are still available in SQL Server 2005.

http://msdn2.microsoft.com/en-us/library/ms191475.aspx

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

Wednesday, March 28, 2012

Read/Write statistics, per table?

And one other Q, is there any way to get the number of reads/writes, one
each table, for a particular time period, without profiling the db?
Thanks again!
In SQL Server 2005, you can pull at least some form of this information from
sys.dm_db_index_usage_stats. In 2000, I don't think you can get much of
anything.

Adam Machanic
SQL Server MVP
Author, "Expert SQL Server 2005 Development"
http://www.apress.com/book/bookDisplay.html?bID=10220
"Derrick" <derrick1298@.excite.com> wrote in message
news:u1XMdROuHHA.3544@.TK2MSFTNGP03.phx.gbl...
> And one other Q, is there any way to get the number of reads/writes, one
> each table, for a particular time period, without profiling the db?
> Thanks again!
>

Read/Write statistics, per table?

And one other Q, is there any way to get the number of reads/writes, one
each table, for a particular time period, without profiling the db?
Thanks again!In SQL Server 2005, you can pull at least some form of this information from
sys.dm_db_index_usage_stats. In 2000, I don't think you can get much of
anything.
Adam Machanic
SQL Server MVP
Author, "Expert SQL Server 2005 Development"
http://www.apress.com/book/bookDisplay.html?bID=10220
"Derrick" <derrick1298@.excite.com> wrote in message
news:u1XMdROuHHA.3544@.TK2MSFTNGP03.phx.gbl...
> And one other Q, is there any way to get the number of reads/writes, one
> each table, for a particular time period, without profiling the db?
> Thanks again!
>

Read/Write statistics, per table?

And one other Q, is there any way to get the number of reads/writes, one
each table, for a particular time period, without profiling the db?
Thanks again!In SQL Server 2005, you can pull at least some form of this information from
sys.dm_db_index_usage_stats. In 2000, I don't think you can get much of
anything.
Adam Machanic
SQL Server MVP
Author, "Expert SQL Server 2005 Development"
http://www.apress.com/book/bookDisplay.html?bID=10220
"Derrick" <derrick1298@.excite.com> wrote in message
news:u1XMdROuHHA.3544@.TK2MSFTNGP03.phx.gbl...
> And one other Q, is there any way to get the number of reads/writes, one
> each table, for a particular time period, without profiling the db?
> Thanks again!
>

Wednesday, March 21, 2012

Read + Statistics from SQl

I have a very big problem. I must do this vbs or i'll be fired...Help me, i'm newbie at vb...

I have a SQL2000 database with a columns defined like that:
Server name, data, service1, service2, ..., service7.

Records looks something like that:

k2-ss-ss, 2003-08-13, 1, 0, 1, 1, 1, 1, 0.
k2-qq-ww, 2003-08-14 0, 0, 1, 1, 0, 0, 1.

"1" - means running
"0" - means stopped

example
a write: "service1", "2003-08-11 ", "2003-08-14"
Script list, that service1 worked 94,3% at choosed period, on k2-ss-ss.
Script list, that service1 worked 06,3% at choosed period, on k2-qq-ww.

Records to the database are writen every 3 minutes.

Can anyone help me? Some piece of code?:(create procedure SaveYerAss
(@.Service varchar(50),
@.StartDate datetime,
@.EndDate datetime)
as

select @.Service + ' worked ' +
case @.Service
when 'Service1' then 100 * Service1Count/RecordCount
when 'Service2' then 100 * Service2Count/RecordCount
when 'Service3' then 100 * Service3Count/RecordCount
when 'Service4' then 100 * Service4Count/RecordCount
when 'Service5' then 100 * Service5Count/RecordCount
when 'Service6' then 100 * Service6Count/RecordCount
when 'Service7' then 100 * Service7Count/RecordCount
end
+ '% at choosed period, on ' + Servername + '.'
From
(select servername,
sum([service1]) Service1Count,
sum([service2]) Service2Count,
sum([service3]) Service3Count,
sum([service4]) Service4Count,
sum([service5]) Service5Count,
sum([service6]) Service6Count,
sum([service7]) Service7Count,
count(*) RecordCount
from [YerDataTable]
where [data] between @.StartDate and @.EndDate) SummarizedData|||bm, your subquery lacks a
group by servername
clause.|||Well, he ought to do SOMETHING to save his own job! :D|||bm, I take it as a THANKS. :D|||What do you want to bet that was a homework problem?