Gautma Buddha is said to have been a Bodhisatva for several hundreds of thousands of aeons.
The Theravada school usually says that these extremely long periods are required by a Buddha to train oneself. If we assume that the training took 1,000,000,000,000 years and he taught as a Buddha for 45 years, then the training to teaching ratio is extremely ineffective.
The Mahayana school says that Bodhisatvas could have become Arhats way before that but intentionally delayed this decision out of compassion to countless of beings. Hence, these extremely long periods are required by a Bodhisatva not necessarily to to train oneself, but to train others. Therefore the state of Bodhisatva is a special delay mechanism to allow a future Buddha to continue in the cycle of life and death, and gradually train countless of beings into Unbinding from the cycle of death.