Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Better Way of XQuerying


Better Way of XQuerying

Author
Message
SQLRNNR
SQLRNNR
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21075 Visits: 18259
Looking at this quickly, I have two observations.

1. I'd look at dumping this to a file as Grant suggested. That can be very useful - it depends. I have to think more on what you are trying to achieve and tinker with your code.

2. You may want to setup an MDW with a Data Collector and pull the info you are seeking out of the ring buffer and store it in a normalized fashion within a database. IMHO this can be useful for historical research and to more easily manipulate the data.

I know I said two, but I am curious if you have considered using a histogram target (looks like you are trying this in 2012). If I understand the basic needs - this could be a useful output.

Lastly, to make sure I am understanding correctly as I set out to test, could you provide some semblance of how you want the data to be represented?



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

SQLRNNR
SQLRNNR
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21075 Visits: 18259
Jeff Moden (2/22/2013)
Grant Fritchey (2/22/2013)
Instead of running XML queries against the server, a relatively high process event, I'd output the Extended Events to a file, then you can read that file from another server and never impact your production machine in any way. That approach makes a lot more sense to me.


I've been up to my eyes with work and they only have SQL Server 2005 so I haven't even broken the surface on Extended Events. That explains my apparent shock and mortification when I say "REALLY!!!! They screwed EE up with XML???" Sick


Yes XML - just like just about everything else in SQL Server these days. Think about everything that is XML based now in SQL Server.

And just for FYI - it is XE (yeah I know, but maybe they felt EE was already too well associated to Enterprise Edition).;-)



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Jeff Moden
Jeff Moden
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45038 Visits: 39893
I'm still absolutely amazed that HTML and XML ever made it out of the starting blocks. Both are horribly tag-bloated which unnecessarily clogs the pipe, bottlenecks I/O, and uses unnecessary amounts of memory and disk space. They require de-entitization of some fairly common characters, require comparatively a lot of cpu time to shred or create, XML requires prior structural knowledge to parse it in T-SQL (which is VERY contrary to what it was initially advertised to do), is a whole lot less human readable than I ever expected especially for the more deeply nested stuff, and requires at least 2 different parsing techniques for "combination" XML (Element and Entity combined).

I realize that both HTML and XML have worldwide acceptance and have become the defacto standard for digital communications between computers but, just because a couple of billion people are all doing the same thing, I don't have to like it especially since I think they're doing it wrong. :-P

Admittedly and ironically, the good things that I've seen come out of it is 1) the manufacturers of PC hardware and all that connects them together have had to make everything bigger (capability wise) yet more compact and much faster to handle the tag-bloat and parsing requirements and 2) the world has finally agreed on something even if I think it's crud. ;-)

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
SQLRNNR
SQLRNNR
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21075 Visits: 18259
Jeff Moden (2/22/2013)

Admittedly and ironically, the good things that I've seen come out of it is 1) the manufacturers of PC hardware and all that connects them together have had to make everything bigger (capability wise) yet more compact and much faster to handle the tag-bloat and parsing requirements and 2) the world has finally agreed on something even if I think it's crud. ;-)

:-D



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search