Best wishes on Ganesha Vinayaka Chaturthi. Lord Ganesha has played a vital role in the writing of the Mahabharata.
Since Veda Vyasa was intimately acquainted with the characters of the Mahabharata, he was asked by Lord Brahma to write the story of their deeds. Vyasa said that the story was long and complex, and he would require the assistance of a scribe. Lord Brahma then suggested the name of Lord Ganesha who was known for his writing skill. Lord Ganesha said that he would accept the task on one condition: Vyasa would have to dictate without any break.
To ensure that his composition of the verses would match the speed of Lord Ganesha’s swift writing, Vyasa made a counter-condition—that Lord Ganesha would write only after he had grasped the meaning of the verses. After a few verses, Vyasa would throw in a difficult verse. In the time that it took Lord Ganesha to grasp the meaning of the difficult verse, Vyasa would compose several new verses in his mind. This explains why the Mahabharata consists of a mix of easy and difficult verses.