I was having issues with my website where a specific page was taking about 15 seconds to return data on my live website and 2 seconds on my staging website. They both used the same database backup though.
I then realized that for my staging database, I had deleted the old staging database and restored the converted backup as the new staging database.
However, with the live database, I had run the database conversions directly on the live database.
So then I did the same for my live database and deleted the existing one, then restored it from the converted backup and voila, the time went down from 15 seconds to 2 seconds for that one particular web page.
My question is why?? The only thing that comes to mind is that maybe the indexes were getting too large, and by deleting the database, the indexes were recreated?\
Am I far off? Any other reasons? Also, if this was the case, how could I get around this in future without deleting the database??
Thanks