Re: Megabytes of stats saved after every connection

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Megabytes of stats saved after every connection
Дата
Msg-id 87y87p7dwn.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Megabytes of stats saved after every connection  (Phil Endecott <spam_from_postgresql_general@chezphil.org>)
Ответы Re: Megabytes of stats saved after every connection  (Phil Endecott <spam_from_postgresql_general@chezphil.org>)
Список pgsql-general
Phil Endecott <spam_from_postgresql_general@chezphil.org> writes:

> Hello again,
>
> Just to give a bit of background, in case it is useful: this is my family tree
> website, treefic.com.  I have a schema for each user, each with about a dozen
> tables.  In most cases the tables are small, i.e. tens of entries, but the
> users I care about are the ones with tens of thousands of people in their
> trees.  The schemas are independent of each other.  Example web page:

I would strongly suggest you reconsider this design altogether. A normal (and
normalized) design would have a users table that assigns a sequential id to
each user. Then every other table would combine everybody's data but have a
user id column to indicate which user that row belonged to.

If you don't believe there's anything wrong with your current system, consider
what it would look like to query your existing schema to find out the answer
to the question "how many users have > 1000 people in their tree". Or "how
many users have updated their tree in the last 7 days".

In a normalized database you really want one table for any given type of data.
Not hundreds of tables that contain the same type data but for different
people.

--
greg

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

Предыдущее
От: "John D. Burger"
Дата:
Сообщение: Re: GUID for postgreSQL
Следующее
От: Greg Stark
Дата:
Сообщение: Re: GUID for postgreSQL