Will a tooth filling work well enough in place of a root canal?

So after visiting a dentist a couple weeks ago, the dentist said that one of my teeth has a cavity deep down near the bottom of the tooth. She said she would recommend me get a root canal to have it fixed since the cavity is really close to the root and a small part of the root seem to be beginning to show signs of... show more So after visiting a dentist a couple weeks ago, the dentist said that one of my teeth has a cavity deep down near the bottom of the tooth. She said she would recommend me get a root canal to have it fixed since the cavity is really close to the root and a small part of the root seem to be beginning to show signs of infection. But since having a root canal done would cost me well over $2k out of pocket after insurance, I opted to just have a filling done.

So, my question is that if a tooth need (or in this case, highly recommends) a root canal...would a simple filling do just as well to prevent further cavity/infection of that tooth? Or would I still need to get a root canal done even after my tooth is filled?
5 answers 5