Database performance improvement from old project
My current project requires to insert lot of records (around millions) to the database. Unfortunately, this project was developed year ago and now, passed to my team, so all the designs (database, hibernate, ...) are done already. Is there any way to improve the performance of the database? since everytime i try to count the record of one table (2 mil+ records, Mysql), it cost nearly 4 minutes 
Database performance improvement from old project
===

My current project requires to insert lot of records (around millions) to the database. Unfortunately, this project was developed year ago and now, passed to my team, so all the designs (database, hibernate, ...) are done already. Is there any way to improve the performance of the database? since everytime i try to count the record of one table (2 mil+ records, Mysql), it cost nearly 4 minutes 