Re: Thousands of tables versus on table?

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Thousands of tables versus on table?
Дата
Msg-id 877iqjmro5.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: Thousands of tables versus on table?  (Thomas Andrews <tandrews@soliantconsulting.com>)
Ответы Re: Thousands of tables versus on table?
Re: Thousands of tables versus on table?
Список pgsql-performance
"Thomas Andrews" <tandrews@soliantconsulting.com> writes:

> I guess my real question is, does it ever make sense to create thousands of
> tables like this?

Sometimes. But usually it's not a good idea.

What you're proposing is basically partitioning, though you may not actually
need to put all the partitions together for your purposes. Partitioning's main
benefit is in the management of the data. You can drop and load partitions in
chunks rather than have to perform large operations on millions of records.

Postgres doesn't really get any faster by breaking the tables up like that. In
fact it probably gets slower as it has to look up which of the thousands of
tables you want to work with.

How often do you update or delete records and how many do you update or
delete? Once per day is a very low frequency for vacuuming a busy table, you
may be suffering from table bloat. But if you never delete or update records
then that's irrelevant.

Does reindexing or clustering the table make a marked difference?

I would suggest you post your schema and the results of "vacuum verbose".

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com


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

Предыдущее
От: Thomas Andrews
Дата:
Сообщение: Re: Thousands of tables versus on table?
Следующее
От: Thomas Andrews
Дата:
Сообщение: Re: Thousands of tables versus on table?