Surefire ADO.NET Performance Tips

Performance is one of the key metrics that determine the success of your application. And performance in the middle tier of a given application is often one of those make or break aspects of an app that receive little or no developer attention. Take advantage of these five ADO.NET-based performance tips to ensure that your ADO.NET applications perform up to your own—and your users—expectations:

  1. Don’t use the DbCommandBuilder object.
  2. Avoid retrieving long data if you don’t need it.
  3. Manage commits in transactions.
  4. Use DbCommand.Prepare() appropriately.
  5. Use the DbDataReader instead of the DataSet when you can.