• Hi, thanks for responding.

    Unfortunately the data captured in the XML is defined by the users, and includes free text areas which are not limited in size. The requirement is to return ALL the data.

    Changing NVARCHAR(MAX) to NVARCHAR(4000) has no discernible effect.

    If all the xquery.value() selects are removed, the data returns in about 7 seconds

    If there is only one xquery .value() method in the query, then the data is returned in about 14 seconds - as they are added back in, the time increases