Re: Scaling PostgreSQL-9

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: Scaling PostgreSQL-9
Дата
Msg-id AANLkTinnvAX79gmbKQ7jvKQZVsoL3H3CC=Z29V_Z0nT7@mail.gmail.com
обсуждение исходный текст
Ответ на Scaling PostgreSQL-9  ("sandeep prakash dhumale" <sandy9940@rediffmail.com>)
Ответы Re: Re: [GENERAL] Scaling PostgreSQL-9  ("Sandy" <sandy9940@rediffmail.com>)
Список pgsql-general
On Tue, Sep 28, 2010 at 6:31 AM, sandeep prakash dhumale <sandy9940@rediffmail.com> wrote:
I have a table with 400M records with 5 int columns having index only on 1 column.

How is your data used?  Is the update done by the primary key?  Are the queries segmented in some way that may divide the data based on one of the other columns?

You should investigate using partitions to hold your data.  I'd recommend at least 100 partitions.  I've done this with great success by dividing some tables along one of the foreign keys.  My table was just a pure relation relating the PKs of two other tables.  After analyzing the queries that were most often run, we decided to split along the one which resulted in the fewest partitions being referenced per search.

By splitting, we reduced a 200M+ row table into 100 tables of ~2M rows, and the constraint exclusion (or altering the queries to directly access the proper partition) reduced our query times dramatically.

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

Предыдущее
От: Allan Kamau
Дата:
Сообщение: Re: huge difference in performance between MS SQL and pg 8.3 on UPDATE with full text search
Следующее
От: Dave Page
Дата:
Сообщение: Re: PostgreSQL 9 Mac OS X one-click install - PL/perl broken