Re: Index xml in variable
- From: Kent Tegels <ktegels@xxxxxxxxxxx>
- Date: Fri, 19 Oct 2007 03:30:03 +0000 (UTC)
Hello JRStern,
Hi, more newbie questions. When I first read over the SQLServer XML
documentation, I saw you could index XML. I thought this would be
great if you had a big single XML value that you were working on. I
have a 2.4mb XML value now, and yeah, it's running slow, several
minutes to do a cross apply returning about a thousand rows. So I
thought, great time to index!
Only now it seems the indexing is for XML in tables, not in a
variable.
Does it pay to write a single (2.4mb) value to a table with an index?
Yes, probably. Even if it is to a temp table.
Funny thing is, on a very similar XML structure with the same kind of
processing we had concerns about scalability, so a few weeks ago I'd
created a 2.3mb test data, and it ran in about fifteen seconds. I'm
really not sure why this one is different and running about 10x
slower. FWIW, this is on a smallish workstation (laptop), and what I
see is the CPU pegged while it runs, little or no IO.
Have to see your query to tell you with an sense of surety.
Thanks!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
.
- References:
- Index xml in variable
- From: JRStern
- Index xml in variable
- Prev by Date: Re: Un-encoding XML special characters, please help
- Next by Date: Re: Index xml in variable
- Previous by thread: Re: Index xml in variable
- Next by thread: Re: Is outer apply like outer join?
- Index(es):
Relevant Pages
|