You MUST add indexes to an XML column in SQL Server. If you don't do that, queries will soon become very slow. Just run these statements:
CREATE PRIMARY XML INDEX primaryidx ON [table](XmlColumnname)
GO
CREATE XML INDEX pathidx ON [table](XmlColumnname)
USING XML INDEX
primaryidx FOR PATH
GO
CREATE XML INDEX valueidx ON [table](XmlColumnname)
USING XML INDEX
primaryidx FOR VALUE
GO
CREATE XML INDEX propidx ON [table](XmlColumnname)
USING XML INDEX
primaryidx FOR PROPERTY
GO
Geen opmerkingen:
Een reactie posten