Re: Large Tables/clustering/terrible performance ofPostgresql

Поиск
Список
Период
Сортировка
От Jeffrey W. Baker
Тема Re: Large Tables/clustering/terrible performance ofPostgresql
Дата
Msg-id Pine.LNX.4.33.0112311349590.5617-100000@windmill.gghcwest.com
обсуждение исходный текст
Список pgsql-general

On Mon, 31 Dec 2001, Michael McAlpine wrote:

> Thanks for the reply.
>
> Explain results:
>
> NOTICE:  QUERY PLAN:
>
> Seq Scan on table1  (cost=0.00..163277.83 rows=1 width=300)
>
> EXPLAIN

Welp, that's your problem I suspect!  Postgres is going to read every
single record in your table to find the result.  You need an index, and
Postgres needs to use it.  If you don't have an index, add one:

create index table1_name_idx on table1(name);

After you have an index, Postgres needs to learn to use it:

vacuum verbose analyze table1;

Then re-run explain and let us know how things shake out.

-jwb



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

Предыдущее
От: "Jeffrey W. Baker"
Дата:
Сообщение: 7.2 changes to varchar truncation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Large Tables/clustering/terrible performance