I have a table in my Grails app that is growing rather large – 100,000 rows or so and it’s growing by about 10,000 rows per day. I’ve noticed that inserts are getting progressively slower as the table grows. I assume this has to do with my indexes. What is the best way to address this?
Share
Yes could be indexes, but often the biggest hit is because the hibernate session is bloated out, described well by Ted Naleid . If this doesn’t work for you tell us more about your situation are you doing bulk inserts or is it your site getting 10000 inserts from different requests etc?
I got around this by having a simple method that is called every so often as Ted suggests (eg every 1000 rows inserted)