To add to Avrohom Yitzchok's answer:
The B'nei Yissaschar (Sivan 5:13; cf. Kisleiv 3:19) attributes this statement to the Rambam:
ואמר הרמב"ם מי שלא טעם טעם התרת הספיקות (בתורה) לא טעם שמחה מימיו
Translation:
And the Rambam said, "Whoever has not tasted the taste of resolving doubts (in Torah), has not tasted joy all his days."
I don't know where in the Rambam's writings he may have meant, but, as R' Betzalel Shafran remarks in his responsa (vol. I, §82, fn. 1), this seems similar to the idea mentioned in the Rambam's Hil. T'shuva (8:2):
העולם הבא אין בו גוף וגויה אלא נפשות הצדיקים בלבד בלא גוף כמלאכי השרת... כך אמרו חכמים הראשונים העולם הבא... צדיקים יושבים ועטרותיהם בראשיהן ונהנין מזיו השכינה... וכן זה שאמרו עטרותיהן בראשיהן כלומר דעת שידעו שבגללה זכו לחיי העולם הבא מצויה עמהן והיא העטרה שלהן... והרי הוא אומר ושמחת עולם על ראשם ואין השמחה גוף כדי שתנוח על הראש כך עטרה שאמרו חכמים כאן היא הידיעה. ומהו זהו שאמרו נהנין מזיו שכינה שיודעים ומשיגין מאמתת הקב"ה מה שאינם יודעים והם בגוף האפל השפל
Translation of the Rambam:
There is no body or physical form in the World to Come, only the souls of the righteous without a body, like ministering angels.... So said the early sages, "In the World to Come... the righteous sit with their crowns on their heads and enjoy the splendor of the Divine Presence"... That which they said, "their crowns on their heads," means that the knowledge that the righteous knew, on account of which they merited the life of the World to Come, will be found with them, and this is their crown....
And it says, "and eternal joy on their heads," though joy has no body with which to physically rest on a head. So too, the crown of which the sages spoke here refers to knowledge. And what is the meaning of that which they said, "enjoy the splendor of the Divine Presence"? That they will know and apprehend of the truth of the Holy One Blessed be He that which they did not know while in a dark and lowly body.