Tune Application Logic

Follow these guidelines for tuning applications.

  • Use prepared statements for all operations. This greatly reduces latency.
  • Avoid expensive join queries by denormalizing and adding constraints.
  • Design queries so that results are pruned to the smallest result set first.
  • Create indexes before loading data.
  • Use sufficient indexes to optimize frequently executed queries. Because indexes add to the footprint of your application, make sure that the indexes you add provide a meaningful performance benefit.
  • Minimize the use of transactions. GemFire XD provides atomicity and isolation for single rows even without transactions.
  • Keep the transaction duration and the number of rows involved in the transaction as low as possible. GemFire XD acquires locks eagerly, and long-lasting transactions increase the probability of conflicts and transaction failures.
  • Minimize the use of REPEATABLE_READ transactions.