Обсуждение: database tuning

Поиск
Список
Период
Сортировка

database tuning

От
"Johnson, Shaunn"
Дата:

Howdy:

I'm running PostgreSQL 7.2.1 on Redhat Linux 7.2
kernel 2.4.7-10.

I have a question about performance tuning
with PostgreSQL.

A few weeks ago, I installed and migrated data
from version 7.1.3 to version 7.2.1.  After that,
it seems that when I load data, have users do
a select / insert / or otherwise access the
database, it takes a very long time to complete.

When looking at the processes with 'top', what
used to happen was whatever was running would take
all of the resources (or, whatever was available);
so, if there were say, four 'selects' from the
database, there would be four processes fighting
for CPU time.  Now it seems that the processes
are more idle and are not using the CPU as effectively
and efficiently as they could.

How can I change this?  What can I do to tune
the database more efficiently?

Thanks!

-X

Re: database tuning

От
Tom Lane
Дата:
"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:
> A few weeks ago, I installed and migrated data
> from version 7.1.3 to version 7.2.1.  After that,
> it seems that when I load data, have users do
> a select / insert / or otherwise access the
> database, it takes a very long time to complete.

Do you see a lot of disk activity when this happens?  If the bottleneck
is not CPU it seems like it must be I/O.

I'm wondering if you forgot to do a "vacuum analyze" in the new
installation, and so the planner is choosing bad query plans.

            regards, tom lane