From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | "John Zhang" <johnzhang06(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Fwd: Performance Tuning |
Date: | 2008-11-17 18:27:29 |
Message-ID: | dcc563d10811171027p14153616vd6e60d0facec164d@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Nov 17, 2008 at 11:21 AM, John Zhang <johnzhang06(at)gmail(dot)com> wrote:
>
>
> Hi the list,
>
> I have a performance problem and would like to any input on how to make it
> perform as desired. In the DB, there are a few tables over 3 million records
> in postgis. When I do some operation on the tables, e.g. CREATE INDEX, it
> takes hours without results. I believe there must be something wrong within
> the DB. However, I have not figured it out. Could anyone point me to the
> right direction to tune and configured the database efficiently?
Assuming it's creating GIN indexes, and possibly even if not, index
creation is very dependent on having a large enough work_mem for it to
fit a large portion of the data it's working on in memory. Try
cranking up work_mem before index creation. Note that you don't have
to do this in postgresql.conf and reload, you can just do it in the
session you're in:
set work_mem=512000;
create index blah blah blah;
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2008-11-17 18:30:10 | Re: pgsql-general@postgresql.org |
Previous Message | Tony Caduto | 2008-11-17 18:24:25 | compiling libpq.dll with Borland C++, is it possible? |