title: Query execution speed PostgreSQL 8.1 vs PostgreSQL 9.2
body: <p>My question is general, but I've also aparticulr example to explain my problem. I developed a webapp with persistence layer based on Openjpa and used two databases to test it. One is Postgres 8.1 and the other Postgres 9.2. They have the same content, same data!
  When I deployed my webapp all worked well but when I use PostgreSql 8.1 I've a great and very strange problem: a select query of the type <code>SELECT * FROM MEDICINE_CASE</code> takes max 10 secs on  Postgres 9.2 and over than 40-50 secs on Postgres. This could waste a lot of good work on my webapp. MEDICINE_CASE table is an huge table with 20 columns and over than 5000 entries, and it has 7-8 of foreign key relationships with other tables. Can You help me to discover why this problem happens and how to solve it on Postgres 8.1??  </p>