Re: help required in design of database

Поиск
Список
Период
Сортировка
От Steinar H. Gunderson
Тема Re: help required in design of database
Дата
Msg-id 20060210210319.GA18407@uio.no
обсуждение исходный текст
Ответ на help required in design of database  (david drummard <vijayspam@gmail.com>)
Список pgsql-performance
On Fri, Feb 10, 2006 at 12:20:34PM -0800, david drummard wrote:
> 1) create a new table every time a new feed file comes in. Create table with
> indexes. Use the copy command to dump the data into the table.
> 2) rename the current table to some old table name and rename the new table
> to current table name so that applications can access them directly.

That sounds like a working plan.

> Should i create indexes before or after import ? I need to do this in
> shortest period of time so that the data is always uptodate. Note that
> incremental updates are not possible since almost every row will be changed
> in the new file.

You should create indexes after the import. Remember to pump up your memory
settings (maintenance_work_mem) if you want this to be quick.

/* Steinar */
--
Homepage: http://www.sesse.net/

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

Предыдущее
От: david drummard
Дата:
Сообщение: help required in design of database
Следующее
От: "Tim Jones"
Дата:
Сообщение: joining two tables slow due to sequential scan