Re: splitting a table?

Поиск
Список
Период
Сортировка
От Arjen van der Meijden
Тема Re: splitting a table?
Дата
Msg-id 001401c33739$71511a70$3ac15e91@acm
обсуждение исходный текст
Ответ на Re: splitting a table?  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
> Richard Huxton wrote

> You could split the table and build a view that UNIONs the
> individual tables,
> but that's not very elegant and 10 million records isn't much.
I think that union-solution would be quite a bit slower than simply
searching through the table.

> Things to check for:
>  - Have you run VACCUM FULL or VACUUM ANALYSE recently?
>  - Are your "where" data-types the same as the index data-types?
>  - See if the indexes are used in the EXPLAIN ANALYSE output.
And of course whether the hd-parameters are set in case of an ide disk,
whether there is sufficient memory allocated for the shared buffers,
etc.

It may also be wise to have multiple indexes. If you, for instance,
search very often on a combination of values and very often on a single
value two indexes (the combined one and the separate one) could improve
both queries. Although the combined index would be used in both cases if
that were the only index, it isn't the most efficient index to use in
that case, afaik.

Arjen




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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: splitting a table?
Следующее
От: "Johnson, Shaunn"
Дата:
Сообщение: Re: splitting a table?