• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Logging requests times of all queries?

Enthusiast ,
Apr 11, 2013 Apr 11, 2013

Copy link to clipboard

Copied

Could anybody tell me if there is anyway to log requests times of all queries?

I have a recent issue where I've started to get deadlock issues with my SQL. There are so many pertential permitations from the SQL queries based on individual users and other data that I'm having a hard time figuring/replicating  which queries might be taking too long and under what circumstances

Thanks

Mark

TOPICS
Advanced techniques

Views

558

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 11, 2013 Apr 11, 2013

Copy link to clipboard

Copied

If you put a result attribute in the query tag you get a structure that includes the execution time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 11, 2013 Apr 11, 2013

Copy link to clipboard

Copied

LATEST

Ah. cool

So I did a search, so I add result="mysqlcommand"

Then reference #mysqlcommand.ExecutionTime# for the result which I can write to the log file

I'll have to go through each and every command but I know which page is giving 99% of the trouble.

I did some other investigation on the indexes and they are all out of wack, showing values of 80 to 90% fragmentation, yet even after I try to rebuild them I still end up with 50%+, so that can't be helping

Thanks (yet again) Dan!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation