as a by-product vs by the way

as a by-product

by the way

prep
  • Incidentally; used in referencing a parenthetical statement not timely, central, or crucial to the topic at hand; foregone, passed by, something that has already happened. 

adv
  • Irrelevantly, off-topic. 

How often have the words as a by-product and by the way occurred in a corpus of books? (source: Google Ngram Viewer )