Forum Post: Re: The Best Approach To Create Thousands Of Records In A Trigger?

  • Thread starter Thread starter ithrees
  • Start date Start date
Status
Not open for further replies.
I

ithrees

Guest
Thank you Mani for you reply. But my scenario is, say I have student, course and student-course objects in my system. Whenever I create a new course I have to create a student-course record for every student in the student object. I can simply do this by writing an after-create trigger for the course object. So this trigger will loop all the student records and will create student-course records for all the students. This is working fine but my only worry is since I am expecting to handle around 3000 students in the system, What will happen when this trigger tries to create 3000 student-course records? Will there be timeout issue or performance issue or any other..? Is there any better way to achieve this requirement something like running a batch job? Ithrees

Continue reading...
 
Status
Not open for further replies.
Back
Top