Rabbi Samuel bar Nachmani said: What is the meaning of what is written, "long of nostrils [slow to anger]" (Exodus 34:6) in the plural, and not "long of nostril" in the singular? It teaches that the Holy One, blessed be He, is patient with the righteous and with the wicked alike. "He keeps loving-kindness for thousands" (Exodus 34:7). It was taught in a baraita: Rabbi Shimon ben Elazar says: Greater is the one who acts out of love than the one who acts out of fear, for the reward of the latter hangs upon a thousand generations, while the reward of the former hangs upon two thousand. Here it is written, "and showing loving-kindness to thousands, to those who love Me" (Exodus 20:6), and there it is written, "to those who love Him and keep His commandments, to a thousand generations" (Deuteronomy 7:9). This phrase applies to the words adjacent to it ["those who love Me," hence two thousand], and that phrase applies to the words adjacent to it ["keep His commandments," hence one thousand]. "He visits the iniquity of the fathers" (Exodus 34:7).
Why God Is Slow to Anger Even Toward the Wicked
Yalkut Shimoni on Torah 399:1
אָמַר רַבִּי שְׁמוּאֵל בַּר נַחְמָנִי. מַאי דִּכְתִיב אֶרֶךְ אַפַּיִם וְלָא כְתִיב אֶרֶךְ אַף. מַאֲרִיךְ אַפַּיִם לַצַּדִּיקִים וְלָרְשָׁעִים. נֹצֵר חֶסֶד לָאֲלָפִים. תַּנְיָא. רַבִּי שִׁמְעוֹן בֶּן אֶלְעָזָר אוֹמֵר. גָּדוֹל הָעוֹשֶׂה מֵאַהֲבָה יוֹתֵר מִן הָעוֹשֶׂה מִיִּרְאָה, שֶׁזֶּה תָלוּי לְאֶלֶף דּוֹר וְזֶה תָלוּי לְאַלְפַּיִם, הָכָא כְתִיב (נֹצֵר) ["וְעֹשֶׂה] חֶסֶד לַאֲלָפִים לְאֹהֲבַי", וְהָתַם כְּתִיב (דברים ז, ט) "לְאֹהֲבָיו וּלְשֹׁמְרֵי מִצְוֹתָו לְאֶלֶף דּוֹר", הַאי לְדִסְמִיךְ לֵיהּ וְהַאי לְדִסְמִיךְ לֵיהּ. פֹּקֵד עֲוֹן אָבוֹת).