Response time

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I have a table with 37000 records with a int column and a xml column. The int
column have primary index, the xml column have primary index, path index and
value index. When I execute "Select * from MyTable", the response time is
very slow (almost 16 seconds), only when I include the xml column, but if I
execute "Select IntColumn from MyTable" is very fast (less than a second).

What happens????

I tried convert the xml column like this:

select IntColumn, convert(varchar(1500), xmlColumn) from MyTable

In this case, the time was 6 seconds. Seems to me that the conversion of the
xmlColumn to a restricted size speeds up the result.

Someone knows why the retrieval of xml data (or varchar(max)) is so slow?

Thanks for your help.
.