Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if there are any best practice recommendations on setting up databases in a dev environment versus a live environment with regards to configuration.

Should they be as similar as possible (preferably identical)? Or should the dev environment be purposefully under powered in order to push developers to write optimal queries?

This could be as simple in MySQL as setting query_cache_size and related values to lower when on the dev machine.

share|improve this question
up vote 2 down vote accepted

If cost is not the issue, then I would say that development should have the same specifications as production. Here are some reasons:

  1. If you want to replicate a performance issue or a bug that you see in production, you will not be able to get the exact scenario if the machines are not the same.
  2. If the servers are the same and you see an issue in production, but the same issue is not in development then you can narrow it down to some recent configuration change between the servers.
  3. Optimal code should be written regardless of a servers specifications. If a developer write bad code on faster servers she will still write bad code on slower servers.
  4. Good developers can write their code to harness the underlying hardware efficiently. They will be better off writing the code for the same specs that the code will be running on.
  5. Worst case scenario: you can use your development server when a disaster strikes your production server, although this should not be your DR strategy.
share|improve this answer

I'd say that not having in development/test environments one that matches production will be a bad bet.

I worked for a shop where we didn't have an environment that matched production, so we couldn't do many of the tests as we should. I'm not saying that each developer/tester should have an env identical to production, but at least one environment for all devs/testers. And for usual development any environment will do. Testing performance of the code should be mandatory, if not for all pieces of code, than at least for the most used ones (can use profiling tools to find out).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.