Performance tuning while Working with large database
Performance is very important with any application.In this article, I will explain how can improve Performance with large databases.
If your database tables have millions of records then a simple SQL query will take 3-4 mins.but ideal time for a query should be at max 5 sec. Now the Question comes “How can improve performance with large databases.“ Now I am going explain the techniques or guideline which can improve database performance.
There are there main level where you can tune database performance :
1. Database Design level :
- Select proper datatypes and size for table’s fields.
- Use Indexing for primary key constraint or other constraint if required.
- Use table partitioning if table contains millions of records.
- Use appropriate Database engine and encoding.
2. Database Sever configuration level :
- Increase database server hardware configuration such as RAM,CPU,Cache.
- Properly configure the database setting
3. Query level :
- Write optimized query.
- Properly open and close data connection.