locked
CRM 4 and very large numbers RRS feed

  • Question

  • Hello Microsoft friends!

    I am writing a c# application that periodically imports data from various sources into a set of custom entities, one of these entities requires I store the ID used in the original database, however this ID is frequently larger than 3 billion which is bigger than the maximum value of an int or float for a custom entity attribute. (I am not storing anywhere near a billion items in the crm, it's just a small section of a much larger data set)

    My concern is that I am frequently going to be searching on this field, and I imagine the performance hit will be very large if I am forced to store this ID as a string rather than a number.

    my question is: is there a way to store numbers bigger than this, and if not, is there any clever indexing I can do to minimise the extra work needed to search this field as a string?

    Cheers!
    Monday, March 9, 2009 3:31 PM

Answers

  • Hi Popeshoe,

    I'm not entirely sure there is a problem with storing this value in a string format. The physical length of the string e.g. '1 000 000 0' is less than the average email address. You can specify specific fields to be used when searching a list which may assist in indexing those field.

    Either way, MS CRM handles indexing for you and maintains indexes thought SQL maintenance tools. I've yet to experience bad performance when querying a particular string field, so I would venture you'll be ok importing this into a string.

    What you may have difficulty with is querying a range of numbers e.g. 1000-2000 as this won't be supported via Advanced Find.

    As for numbers larger than the Max int/bigint, I don't think there will be a supported way to overcome this problem.

    HiH,

    Karlo

    Karlo Swart - http://www.ver206.com
    Monday, March 9, 2009 9:13 PM

All replies

  • Hi Popeshoe,

    I'm not entirely sure there is a problem with storing this value in a string format. The physical length of the string e.g. '1 000 000 0' is less than the average email address. You can specify specific fields to be used when searching a list which may assist in indexing those field.

    Either way, MS CRM handles indexing for you and maintains indexes thought SQL maintenance tools. I've yet to experience bad performance when querying a particular string field, so I would venture you'll be ok importing this into a string.

    What you may have difficulty with is querying a range of numbers e.g. 1000-2000 as this won't be supported via Advanced Find.

    As for numbers larger than the Max int/bigint, I don't think there will be a supported way to overcome this problem.

    HiH,

    Karlo

    Karlo Swart - http://www.ver206.com
    Monday, March 9, 2009 9:13 PM
  • This is what other people have been telling me too, I guess I needn't have worried!

    Thanks for your help!
    Tuesday, March 10, 2009 2:20 PM