Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Better Way of XQuerying Expand / Collapse
Author
Message
Posted Friday, February 22, 2013 4:58 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 2:50 PM
Points: 21,744, Visits: 15,435
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1423296
Posted Friday, February 22, 2013 5:00 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 2:50 PM
Points: 21,744, Visits: 15,435
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???"


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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1423298
Posted Friday, February 22, 2013 8:15 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 11:19 PM
Points: 37,075, Visits: 31,636
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.

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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1423312
Posted Monday, February 25, 2013 10:30 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 2:50 PM
Points: 21,744, Visits: 15,435
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.





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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1423699
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse