Pergunta

I'm looking for a simple query to say something about database performance

We've created a tool to find out the clients network/server/software performance to create a baseline for us to say that either their server or clients are really underpowered or our software is under performing in some situations.

Why are we doing this?

At one of our clients our software was performing really slowly and they blamed us. After searching around for possible software defects we found that the problem was actually their network speed, it was just terribly slow. (network traffic was routed over a VPN 100 miles away)

What do I need

I'm looking for a 'simple' query to set a baseline performance for a Microsoft sql server database.

Preferably a query that would say if a database is really slow/fast or just working ok.

I've created a simply query's that simply does:

select top 50000 * from BigTable 
where YEAR(startdate) = 2011 or YEAR(startdate) = 2010 
order by table.startdate desc

The BigTable here is actually something that our software would query a lot to do some complex update calculations.

Calling this query(100 times) and timing it from the client gives us a decent guesstimate of the server performance. But I'd rather execute a more computational oriented query with some complex joins that actually said something about the server performance other then a simple select.

Foi útil?

Solução

May I suggest using the same query but set the following before the Query.

Set Statistics IO ON    
go
Set Statistics Profile ON
go
Set Statistics Time ON
go

You could also run SQL Profiler to trace the session which gives by session the CPU,READS,WRITES,DURATION which would provide limited server level information while the session is running on your workstation.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top