An insertion sort is a bit of a special case. It assumes that you will be given a set of values over time, and as you get them, you will insert the value into its correct location based upon the given values.
Depending upon the data, and size, you could utilize different types of sort, such as a binary tree so it is automatically sorted as it enters, or bubble sort.
While normally a bubble sort isn’t considered a good sorting algorithm, it can be very effective for an insertion sort because it’s only checking for the placement of one element, and you can exit the sort once the data is sorted. This can make it relatively fast for insertion sorts, assuming that you are not loading a lot of data at once with it.
This makes sense to sort your data as it’s being inserted, so that it is always sorted when you go to work with it.
Insertion Sort was originally found on Access 2 Learn