A tooth enjoys multifactorial stresses…. Chewing, Grinding, Brushing, External trauma etc.
Moreover location of the filling, material used and maintenance of oral hygiene determine a lot when the question of longevity arises.
Nowadays we use high quality tooth color materials which has fair amount of load bearing capacity and thus the fillings usually last longer than earlier days. But… One thing to remember, no artificial material can be as good as our own tooth material, so if you continue the habits which caused the decay (for which you need the filling), the filling is not expected to withstand.
So, PROPER MAINTENANCE, CHECK UPS AND REPLACEMENT (if required) ARE THE KEY POINTS.