On Feb 10, 2009, at 3:09 PM, Rob Richardson wrote:
> In order to test without disturbing the customer's production, I
> created a copy of their production database on the production
> server. I often create test databases, and I've never seen the
> CREATE DATABASE command take longer than five seconds. On the
> customer's production machine, the command took 167 seconds.
>
> Can anyone explain why it would take 167 seconds to create a
> database? I am hoping that it's the same reason that data access is
> slowing our application by a factor of about 200.
Maybe someone accidentally restored a large database into template1?
That's the default database that gets copied to create a new database.
From my experience it's not unusual for someone to create a database
from the psql prompt and then forgets to switch to the new database
before restoring data into it, and thus it ends up in template1... oops!
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.
!DSPAM:737,4991c5e6747031805728238!