Re: Performance Issues

Поиск
Список
Период
Сортировка
От Douglas McNaught
Тема Re: Performance Issues
Дата
Msg-id 878xotdjnj.fsf@suzuka.mcnaught.org
обсуждение исходный текст
Ответ на Performance Issues  (Dhanaraj M <Dhanaraj.M@Sun.COM>)
Список pgsql-hackers
Dhanaraj M <Dhanaraj.M@Sun.COM> writes:

> I have the following doubts.
>
> 1. Does postgres create an index on every primary key?  Usually,
> queries are performed against a table on the primary key, so, an index
> on it will be very useful.

To enforce the primary key constraint, PG creates a unique index when
the table is created (I think it even tells you this after CREATE
TABLE). 

> 2. If 'm executing a complex query and it takes 10 seconds to return
> the results -- it takes 10 seconds to execute the next time also.  I'm
> wondering if there's any kind of caching that can be enabled -- so,
> the next time it takes <10 seconds to return the results.

All kinds of data is cached in shared memory.  Did you tune the
shared_buffers setting in postgresql.conf?  It's set quite low by
default to make sure the server can start on systems with low shared
memory limits.

The online documentation has this info and lots more--I suggest you
read it.

-Doug


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dhanaraj M
Дата:
Сообщение: Performance Issues
Следующее
От: Tom Lane
Дата:
Сообщение: Re: error-free disabling of individual child partition