Home Forums SQL Server 2008 T-SQL (SS2K8) xml in subselect and performance => alternatives? RE: xml in subselect and performance => alternatives?

  • The way you're doing it is pretty standard. You could switch from an inline sub-query to a Cross/Outer Apply in the From clause, but it won't really do much except change how the query reads.

    In your actual query, as opposed to the sample provided, is it actually using table variables, or does it use persisted tables? If so, check the indexing on them. If it's done right, that kind of query can be very fast, unless the amount of data being returned is simply huge.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon