I need to retrieve data, as XML, from 8 tables that are related by a common
primary key. Ultimately the data should be in a format similar to:
<Table1 field1="blah">
<Table2 field1="blah"/>
<Table2 field1="blah"/>
<Table3 field1="blah"/>
<Table3 field1="blah"/>
<Table4 field1="blah"/>
<Table5 field1="blah"/>
<Table6 field1="blah"/>
<Table7/>
<Table8 field1="blah"/>
</Table1>
For a given successful query, some of the tables will have 1 or more
matching records, others will have 0 or more, and Table 1 will have 1
record. I am currently using joins and XML AUTO to retrieve the data, and
then passing it through an XSL transform to get it into the format I need.
An alternative would be to use a UNION and XML EXPLICT to accomplish the
same thing.
Since ultimately performance will be an issue, it there anyway, short of a
perormance test, to tell which method will be faster? Are there any other
ways to accomplish this that I should consider?
Thanks in advance
-Andy
"Andy Walldorff" <andyw@.REMOVEsuperior.net> wrote in message
news:eWJm5okoEHA.2784@.TK2MSFTNGP14.phx.gbl...
[snip]
> Since ultimately performance will be an issue, it there anyway, short of a
> perormance test, to tell which method will be faster? Are there any other
> ways to accomplish this that I should consider?
You will have to run a test since there are quite a few factors. I think the
XSL method is probably the fastest and it seems the cleanest.
http://www.sqlxml.org/faqs.aspx?faq=55
Bryant
|||"Bryant Likes" <bryant@.suespammers.org> wrote in message
news:%23sSRGlnoEHA.516@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> "Andy Walldorff" <andyw@.REMOVEsuperior.net> wrote in message
> news:eWJm5okoEHA.2784@.TK2MSFTNGP14.phx.gbl...
> [snip]
a[vbcol=seagreen]
other
> You will have to run a test since there are quite a few factors. I think
the
> XSL method is probably the fastest and it seems the cleanest.
> http://www.sqlxml.org/faqs.aspx?faq=55
> --
> Bryant
>
Thanks
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment