1

If you have an object with no records types versus one with a couple, is performance affected in terms of DML insertion?

I experienced a change in DML performance after creating multiple record types on an object that previously had none which led me to wonder if record types do add a type of complexity that I didn't put much thought into before.

6
  • Do you have any other automation on that object?
    – Adrian Larson
    Jul 23 '20 at 20:44
  • I do - workflows, validation rules, and a process builder. My next step was to create a scratch org and test with none of those to get some idea of CPU time with and without record types Jul 23 '20 at 20:46
  • 1
    Do you have any managed packages like DLRS doing automation on your behalf? Generally speaking, it sounds like automation in that org could use some optimization. :-)
    – Mark Pond
    Jul 23 '20 at 20:58
  • @MarkPond - 100% agree in terms of needing optimization. I'm not necessarily looking at solving that with this question. I was more intrigued at whether there's an discernible impact to performance with having record types vs. having none on a given object. Jul 23 '20 at 21:04
  • The question of how Record Types interact with the automation in your org is not really answerable here.
    – Adrian Larson
    Jul 23 '20 at 21:11
2

Generally speaking, no, record types do not add any significant processing time by themselves. They are not generally subject to record locks like many types of parent objects, nor do they do anything much beyond restricting available picklist values. I will not say that the performance difference is definitely exactly zero, but it's close enough that the variations in network latency and server load would make it nearly impossible to discern any measurable difference.

3
  • Picklists and layouts.
    – Adrian Larson
    Jul 23 '20 at 22:29
  • 1
    @AdrianLarson Not as far as DML operations are concerned, though.
    – sfdcfox
    Jul 23 '20 at 22:32
  • That seems reasonable to assume. I was thinking setting the correct default record type by profile (assuming the DML does not provide the record type) might add a bit more complexity but I presume it's still doing that without Record types (assigning the "master" record type). Jul 23 '20 at 22:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.