Here are some basic steps which we can follow to increase the performance:
- Check for indexes in pk and fk for the tables involved if it is still taking time index the columns present in the query.
- All indexes are modified after every operation so kindly do not index each and every column
- Before batch insertion delete the indexes and then recreate the indexes.
- Select sparingly
- Use if exists instead of count
- Before accusing dba first check network connections