Last post Dec 09, 2015 11:50 AM by PatriceSc
Dec 07, 2015 06:19 PM|sudip_inn|LINK
please tell me On what are the column type index can not be created?
Dec 07, 2015 10:47 PM|pranavkothare|LINK
Generally speaking there isn't a specific column type, but limitations are usually on key size. For SQL Server it would be best practice to keep your key size under 900 bytes. So for char columns it would be a length of 900, for varchar columns it would
be 898, for nchar 450, nvarchar 448, the list goes on.
Special columns like filestream are not supported for normal indexing, but full-text indexes are supported.
This article has a full discussion on the topic:
Dec 09, 2015 09:19 AM|sudip_inn|LINK
i guess we can not create index on text and ntext column type........am i right?
can you tell me what are the column type can not be refer in trigger?
Dec 09, 2015 11:50 AM|PatriceSc|LINK
Yes, it wouldn't make sense to be able to create an index with columns that could store a huge amount of data (which is what all those types have in common). The purpose of an index is to be able to quickly find a row from a much smaller part of this row.
I don't see why you couldn't access particular column types in a trigger even though it seems to be less useful (just because anyway you can't do much processing db side on this kind of data, which processing would you do on image data for example in a trigger?).
Have you tried? Do you have a problem? Even when learning it's likely best to post question about a practical situation you see rather than something theorical. For example I likely saw at some point in the doc that you couldn't create an index on some column
types but before that I likely never even wondered or cared as it would not really make sense to even try that.
Edit: in short I believe it is more efficjent to learn based on what you need to do (and perhaps still learn years ago about the same subject because you have a particular case and need to do something you never needed before) rather than to pick a subject
an try to learn everything about it before moving to something else (which might be your approach based on the kind of questions you are asking).