October 9, 2012 at 10:05 am
Hello All..
My boss asked me to give the list of top 5 most queried database in our db server(Ms Sql Server 2005).
How can I achieve this? Any ideas, suggestions and approach?
October 9, 2012 at 10:24 am
Tripz (10/9/2012)
Hello All..My boss asked me to give the list of top 5 most queried database in our db server(Ms Sql Server 2005).
How can I achieve this? Any ideas, suggestions and approach?
What does that even mean? Is your boss looking for the databases that have the most queries executed or the more resource intensive ones? I am guessing he/she want to know the quantity of queries which seems very strange. I wouldn't even begin to have an idea how to count the number of queries executed in a day. You would have to use a trace but the counts will be staggering in a busy system throughout the day.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
October 9, 2012 at 10:33 am
He wants to know the 'the database which has the most number of queries executed' per day,
to see to which db's are used(quried) more on daily basis by the world.
October 9, 2012 at 11:03 am
... And that number will tell you what exactly?
October 9, 2012 at 11:11 am
That is out of my scope, I just need to give the information what they were looking for.
I think they were doing some network analysis..
October 9, 2012 at 11:46 am
Tripz (10/9/2012)
That is out of my scope, I just need to give the information what they were looking for.I think they were doing some network analysis..
For network analysis the number of queries doesn't actually mean anything. My guess is they are trying to figure out network traffic. Let's say we have one db that has 10 million queries executed per day but the average result set is 20k bytes. On another db we have 300 queries but the this database is full of images or files. You can see that the impact to the network has nothing to do with the number of queries.
I know it is outside your scope but getting an understanding of the requirements and usage of the information shouldn't be. Just getting the top 5 databases with the most queries is not really what the boss is looking for. It isn't always easy to push back but in this case I think you should ask for some clarification about the requirements.
If you just simply have to count queries you need to setup a trace and be prepared to be shocked at the number.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
October 9, 2012 at 11:33 pm
He should better ask the application team.
October 10, 2012 at 10:20 am
mmm ... I will try to find more details about it and get back to you
Thank you for the supportive details
October 22, 2012 at 9:48 am
If you still need to get this done, one method was mentioned in this week's Database Weekly email:
http://www.sqlservercentral.com/blogs/ctrl-alt-geek/2012/10/17/querying-database-usage/
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply