Adam Endicott <leftwing17@xxxxxxxxx> writes: > When I run EXPLAIN ANALYZE on this query, it takes something like > 1200ms on my desktop (Dual 2GHz G5 Mac - 1.5 GB RAM for reference) and > about 14000ms on the production server (quad processor, 8 GB RAM, > running Ubuntu). There are about 500 rows in the movies_movie table, > and about 16k rows in the movies_moviescreening table. The data is the > same on both machines. My desktop is running PostgreSQL 8.2.3, and the > production server is running 8.1.9. > Since I don't know much about how to diagnose this, I don't know what > other information to give, so let me know if I've left out something > crucial. Uh ... the actual outputs from the two EXPLAIN ANALYZEs, perhaps? The most likely bets are (1) something different about the postgresql.conf settings on the two machines, or (2) the 8.2 planner is smarter than the 8.1 planner and is choosing a better plan. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster