[Answered ]-Tuning postgresql (for fast reads with django)


20k items is not that big a read. 🙂

On EC2, the main things to do are:

  1. Get as much memory as you can rationally afford; EBS performance is terrible, and you want as much cache as you can manage.
  2. Make sure your shared_buffers setting is correct; 25% of available RAM is a good starting point.
  3. Look at the big read with EXPLAIN ANALYZE to look for opportunities to create indexes (but don’t just create indexes without a practical reason; they’re expensive if they are not being used for anything).
  4. If changing EBS configuration is an option, consider moving to an 8-stripe soft-RAID configuration.

Leave a comment