> I'm looking for a tutorial that will teach me how to read explain
> analyze and maybe point me to some solutions (rewriting the query,
> adding some indexes, tune postgres.conf...).
All of the EXPLAIN tutorials and tools I'm aware of are listed at
http://wiki.postgresql.org/wiki/Using_EXPLAIN and the primary things to
tune in the postgresql.conf are described at