"For in much wisdom is much grief, etc." (Ecclesiastes 1:18). Whenever a person increases in wisdom, he increases in grief; and whenever he increases [in knowledge], he increases in suffering. Solomon said: Because I increased in wisdom, I increased in grief, and because I increased in knowledge, I increased in suffering. Rav said: A scholar (talmid chacham) requires no warning. Rabbi Shmuel bar Nachman said: Fine linen garments that come from Beit Shean, if one of them is scorched, how great is the loss it brings; but coarse linen garments that come from Arbel, if one of them is scorched, how slight it is and how slight is its loss. To what may the matter be compared? To two who entered a shop: one ate fine bread and fatty meat and drank old wine, and went out sick; and one ate coarse bread and legumes and drank cold water, and went out healthy. So too, have you ever seen in your days a donkey or a camel with a fever upon it? Among whom is suffering found? Among human beings. Rabbi Yishmael taught: According to the camel is the burden. Rabbi Meir taught: According to the cunning of the serpent, so was its punishment. Because it is written, "Now the serpent was more cunning than any beast of the field" (Genesis 3:1), therefore it is written, "the serpent is cursed above all." There are those who increased wisdom for their own good, and those who increased it to their own harm. Those who increased it for their own good were David and Solomon; those who increased it to their own harm were Doeg and Ahitophel. There are those who increased wealth for their own good and those for their own harm: those for their own good were David and Solomon; those for their own harm were Korach and Haman. There are those who increased might for their own good and those for their own harm: those for their own good were Judah and David; those for their own harm were Goliath and Samson. There are those who increased in old age for their own good and those for their own harm: those for their own good were Jacob and David; those for their own harm — "And Eli was very old, etc." (1 Samuel 2:22).
Greater Wisdom Brings Greater Grief in Midrash Shmuel
Midrash Shmuel 7:3
כי ברוב חכמה רוב כעס וגו' (קהלת א' י"ח), כל זמן שאדם מרבה בחכמה מרבה בכעס, וכל זמן שהוא מרבה (בחכמה) [ובדעת] מרבה ביסורין, אמר שלמה על ידי שהרביתי בחכמה הרביתי בכעס, ועל ידי שהרביתי בדעת הרביתי ביסורין, רב אמר תלמיד חכם אינו צריך התראה, אמר רבי שמואל בר נחמן כלי פשתן הדקים הבאין מבית שאן, אם (מתפחין) [מתפחמין] אחד (עם אחד) מהן בכמה דמים הוא עשוי, וכלי פשתן הגסין הבאין מארבל אם (מתפחין) [מתפחמין] אחד (עם אחד) (מה) [כמה] הוא (ומה) [וכמה] הן דמיו [משל למה הדבר דומה] לשנים שנכנסו לחנות, אחד אוכל פת נקיה בשר שמן (ויין) [ושתה יין] ישן, ויצא חולה, ואחד אוכל פת קיבר וקיטנית ושתה צונן ויצא בריא, כך ראיתה מימיך חמור וחכא בית עליו, גמל וחכא בית עליו במי היסורין מצוין בבני אדם, תני רבי ישמעאל לפום גמלא שיחנא, תני רבי מאיר לפי מה שהיתה ערמתו של נחש כך היתה מכתו לפי שכתוב והנחש היה ערום מכל חית השדה (בראשית ג' א'), לפיכך כתוב והנחש ארור מכל, יש שהרבו חכמה לטובתן והרגו לרעתן, הרבו לטובתן דוד ושלמה, הרבו לרעתן דואג ואחיתופל, יש הרבו עושר לטובתן דוד ושלמה, הרבו לרעתן קרח והמן, יש שהרבו גבורה לטובתן והרבו לרעתן, הרבו לטובתן יהודה ודוד, הרבו לרעתן גלית ושמשון, יש שהרבו זקנה לטובתן והרבו לרעתן, הרבו לטובתן יעקב ודוד, הרבו לרעתן ועלי זקן מאד וגו' (שמואל א' ב' כ"ב).