Catalog PropertyString stored as Longstring in CatalogContentProperty

Vote:
 

In our product definition we have multiple fields with [BackingType(typeof(PropertyString))] 
This type of string has a max length of 255

When we look up the value in the database, it is stored in the LongString nvarchar(max) field in the CatalogContentProperty table.
I would expect it to be in the String nvarchar(450) column in this table.

Is it possible to change the behaviour so that short strings will be stored in the String column? 

#162105
Oct 11, 2016 9:57
Vote:
 

Hi,

Currently there is no way to do that. However I think this might be a mistake in our side, I'll check with my colleagues about this.

Regards,

/Q

#162113
Oct 11, 2016 10:50
Vote:
 

It was unclear to me why it was LongString instead of String, but our best guess was we followed the design in CMS content system. With newer versions of SQL Server (2005+ I think), the performance of NVARCHAR(450) and NVARCHAR(MAX) with 450 characters are comparable (the difference, if any, is very insignificant)

So I don't think you have to worry about performance. Is there any other reason for your concern?

Regards,

/Q

#162241
Oct 13, 2016 16:58
Vote:
 

For our solution we created a field for the Brand of a product. We read the Brands from the database, and later all products of that Brand.

For performance improvement we wanted to put an index on the column, but because it is a nvarchar(max) column this is not possible.

#162414
Oct 14, 2016 8:18
Vote:
 

If you want to get a product in a brand, I would suggest you to use the SearchProvider APIs - it's faster and more scalable than querying SQL directly.

#162415
Oct 14, 2016 8:58
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.