将 nvarchar(max) 与非索引字段一起使用的含义
任何人都可以解释将字符串存储到定义为 nvarchar(max) 的列中而不是定义 nvarchar(500) 的长度的含义吗?该表将包含多个字段,并且可能包含 1000 万条以上的记录。这些字段也不会被索引。
谢谢!
Could anyone explain the implications of storing strings into a column that is defined as nvarchar(max) instead of defining the length of say nvarchar(500)? The table would contain multiple fields and could have the potential of containing 10million+ records. These fields would also not be indexed.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您尝试搜索该数据时,它是否被索引就会发挥作用。因此,如果它只是在您查询其他字段时附带的数据,那么它应该不会太糟糕。还有更多内容(即覆盖索引),但这就是它的基本要点。
It being indexed or not comes into play when you're trying to search on that data. So, if it's data that just comes along for the ride when you query on other fields, then it shouldn't be too bad. There's a little more to it (i.e. covering indexes), but that's the basic gist of it.