Re: Scale, Normalization, and Table Count

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Scale, Normalization, and Table Count
Дата
Msg-id 200210071453.26478.dev@archonet.com
обсуждение исходный текст
Ответ на Scale, Normalization, and Table Count  (Tom Cross <decius@whack.org>)
Список pgsql-general
On Sunday 06 Oct 2002 10:39 am, Tom Cross wrote:
> Much to my horror I got an error message while attempting to back up my
> database tonight:

[snipped discussion of a design with many thousands of tables versus one large
table with many millions of rows]

> Am I barking up the wrong tree here with all these dynamically generated
> tables? Is it really more reasonable to search a table with 10 million
> entries for the 1000 I want every time a user wants to read something? Are
> there other pitfalls that I need to be aware of? Is there a key book that
> discusses this sort of thing that I could have on my desk?

Given the number of hoops you're trying to jump through (to keep the dog
metaphor) I'd say you are barking up the wrong tree.

Databases are designed to handle large tables and retrieve information
efficiently if indexed correctly. Try adding a "topic_id" column and indexing
it - generate a million test messages and see how it goes. A useful tuning
might be to gradually increase the "sort_mem" value in your config file.

In general, one table for each type of thing in your database is the rule.

- Richard Huxton

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

Предыдущее
От: "Shridhar Daithankar"
Дата:
Сообщение: Re: Distributed / Linked with Open Source DB
Следующее
От: Manfred Koizar
Дата:
Сообщение: Re: Large databases, performance