Re: difference in query plan when db is restored

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "John Watts" <jwatts(at)promotion-update(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: difference in query plan when db is restored
Date: 2012-05-17 19:58:32
Message-ID: 1326.1337284712@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"John Watts" <jwatts(at)promotion-update(dot)com> writes:
> I have a database query which executes normal (under 1s) with 21 steps
> according to the query paln. However, when the database is dumped and
> restored on the _same_ PostgreSQL server, the query plan takes 34 steps
> to complete and it executes in excess of 90 seconds!

Usually you need to ANALYZE after restoring from a dump ...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John Watts 2012-05-17 21:20:30 Re: difference in query plan when db is restored
Previous Message John Watts 2012-05-17 19:43:18 difference in query plan when db is restored