sql server 2005 - unique constraint on large text field -


i have table column xml feed entry (nvarchar(max)) , executed hash function (md5) on column hash key aid in searching , maintain uniqueness. typically on 900 bytes long.now have realized hash key not guarantee uniqueness since did count of duplicate rows on column , amazed , when tried create unique index on hash key column itself, sql server gave me error of cannot create unique index on non deterministic column..something that.

now have searched , found in cases should use type (ntext) , create unique index on that; others mention using checksum , index on that, whilst others mention triggers, checksum, etc. best method implement on field uniqueness keeping in mind table has 22 million records , cannot afford lose data. in advance

microsoft recommends not using ntext types because deprecated in future. documentation here. go using checksums , putting unique index on that. this post discusses this.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -