I've also wondered this....I had a filling a few months ago and I was completely numb for 4 hours before it even began to thaw! But just this Friday, I had gum surgery and the novacaine had worn off almost by the time I had left the office. I was given much more novacaine for the surgery than I was for the filling and it wore off quicker. Go figure...... I guess I don't know the answer to your question!
I think it also has to do with whether they actually get the nerve or just numb the local area and the mixture of the novacaine they use. My perio's novacaine used to make my heart skip or jump a bit so when I told him about it he changed the type of novacaine he used which helped that problem but I found it was not as good in terms blocking the pain entirely and the length of time the novacaine lasted - so he had to give me several shots during each procedure.