none
Determining Query Performance RRS feed

Answers

All replies

  •  But I would be interested in how a tool like this gets its information.


    It gets the info from a mix of sources. Some of the information is exposed directly by the L2S datacontext, some is extracted from the SQL connection (2), some parts from SQL Server's catalog views and DM views (2), some parts from the SQL Server query optimizer, some parts from the CLR itself (through the System.Diagnostics namespace) etc... ...then it is sprinkled with a few dirty tricks with reflection to get hold of non-exposed data from the SqlConnection and DataContext objects, and some magic dust to make it behave nicely. :)

    In short, if you need half of that functionality you will save yourself some time by using already existing tools...


    Kristofer - Huagati Systems Co., Ltd. - Cool tools for Linq-to-SQL and Entity Framework: www.huagati.com/dbmltools (VS designer add-in), www.huagati.com/L2SProfiler (query profiler for L2S)
    Monday, October 5, 2009 12:43 PM
    Answerer
  • Kristofer,

    I appreciate you wanting to sell more of your tools. But I am not interested in having to purchase 20+ copies for each of our developers. Therefore, your response doesn't really help me.

    So, far anyone else out there, who isn't trying to sell me a solution, I would very much appreciate some advice.

    Randy
    Monday, October 5, 2009 1:27 PM
  • Ok, sorry. But you did ask how the profiler gets hold of that information, and I have listed every technique that I use in the profiler's logging component to extract that information. (I just updated that summary with links to the relevant msdn documentation for the things used from within the logging component)



    Kristofer - Huagati Systems Co., Ltd. - Cool tools for Linq-to-SQL and Entity Framework: www.huagati.com/dbmltools (VS designer add-in), www.huagati.com/L2SProfiler (query profiler for L2S)
    Monday, October 5, 2009 2:05 PM
    Answerer
  • Hi Randy,

     

    Kristofer has edited his first post by offering more detailed information about how the logging component is designed.  That’s really helpful!  Thank you so much, Kristofer! 

     

    With such a great answer, I have no additional supplements to add now.  J   Randy, do you need any further assistance?   If there is anything unclear, I believe Kristofer and I will do our best to help you. 

     

     

    Hope you both have a great day!

     

     

    Best Regards,
    Lingzhi Sun


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, October 6, 2009 3:36 AM
    Moderator
  • Lingzhi,

    Kristofer has told me what he is doing, not HOW he is doing it. Nothing he told me is really new to me. What I wanted to know is how is are the DM views queried, or how is the connection string used etc.  He's kept it just mysterious enough to make his product attractive. That doesn't really help me.

    I appreciate the other help Kristoher has given me on other questions. He has been a big help. But, I do not like people who help out here with an agenda of selling their own products and services. IMO, that should not be permitted, or at least strongly discouraged. It is disingenuous.

    Randy
    Thursday, October 8, 2009 11:22 AM
  • Lingzhi,

    Kristofer has told me what he is doing, not HOW he is doing it. Nothing he told me is really new to me. What I wanted to know is how is are the DM views queried, or how is the connection string used etc.  He's kept it just mysterious enough to make his product attractive. That doesn't really help me.

    I appreciate the other help Kristoher has given me on other questions. He has been a big help. But, I do not like people who help out here with an agenda of selling their own products and services. IMO, that should not be permitted, or at least strongly discouraged. It is disingenuous.

    Randy

    Dear Randy,

    Your original post asks very specifically how my tool extract a mix of not directly linked information from a variety of sources. To quote your original post:

    I'm aware of tools like [links to blog & product pages], but I don't need all this tool offers. But I would be interested in how a tool like this gets its information.

    I am probably the only person in a position to let you know what techniques my tool use; there are only four people -myself included- who can legally access the source code for the tool you referred to in your original post, and I am the only one of those four who can type English... ...maybe you want to edit your question to include other similar tools? That would make the question more generic, and thus allow other software vendors with similar solutions (and OSS alternatives) to answer your question.

    In addition, if we're going to be picky - the question is not strictly about Linq-to-SQL so you may want to post it in the support forum for the product you are asking about...?

    I have provided you with eight (8) different links to the MSDN documentation describing how to interact with each one of the technologies used by my tool. If you did not notice the links, the words and sentences that are colored blue and underlined in my first reply in this thread are all hyperlinks that will take you to the relevant MSDN documentation page for the method/class/view/technology mentioned in the link's text. The MSDN documentation is probably the most detailed, accurate, and up-to-date documentation for each one of those. Each one of the eight MSDN pages linked to contain code samples showing how to use each one of those technologies, as well as detailed documentation describing how the classes, views, methods, etc involved work.

    I don't know what else you expected; that I publish the source code for a proprietary tool? I would absolutely love to do that, but unfortunately I can't. You see, the grocery store around the corner has this silly idea that they should charge money for milk, baby diapers, pork chops, rice, and other things that I occassionally need to stock up on. I have time after time tried to convince them that they should give me those things for free so that I can give away all software I spend time writing instead of charging money for it. Unfortunately I have been unsuccessful in doing so, but I will ask them again if they can maybe make an exception just for me...

    In addition, you have already asked in several parallell threads how to get hold of queries etc from the L2S datacontext and others have already replied in those threads how to do that:

    http://social.msdn.microsoft.com/Forums/en-US/linqtosql/thread/91ef68dd-75e2-47ab-9bbe-69001c9a87b1
    http://social.msdn.microsoft.com/Forums/en-US/linqtosql/thread/6f9d9ff7-7397-4073-b7b8-b7fe11dcf4dd

    If you still think my original reply to the question you asked at the top of this thread is out of line, please let me know and I will be happy to remove it.

    Best regards,
    Kristofer


    Kristofer - Huagati Systems Co., Ltd. - Cool tools for Linq-to-SQL and Entity Framework: www.huagati.com/dbmltools (VS designer add-in), www.huagati.com/L2SProfiler (query profiler for L2S)
    Thursday, October 8, 2009 12:22 PM
    Answerer
  • Hi Randy,

     

    I think Kristofer is really a nice guy and has helped lots of community members in MSDN Forums.  If you have any further question, I think we are very glad to help.  To be honesty, Kristofer’s reply is quite helpful already.   I don’t think he needs to give us more source codes and we have been very lucky to hear the design ideas of excellent tools from Kristofer’s team.  J

     

    Hope you both have a great day!

     

     

    Best Regards,
    Lingzhi Sun


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, October 12, 2009 10:38 AM
    Moderator