Using ENUM with huge NAMEDATALEN

Поиск
Список
Период
Сортировка
От David Andersen
Тема Using ENUM with huge NAMEDATALEN
Дата
Msg-id c6bf5b380807261422i77ed5b3evf55da6891e2e4170@mail.gmail.com
обсуждение исходный текст
Ответы Re: Using ENUM with huge NAMEDATALEN
Список pgsql-performance
Hi All,

This is my first post so please be gentle if I make any mistakes.

I know that ENUMs were not intended to be used instead of joins, but I believe that I my case there will be huge saves on using Enums. Every night I will drop the database and rebuild it from CSV files. The database will be quite large with around 200 million rows in a fact table (only numbers). There are about 10 dimension tables (lookup table with ID and text columns). What is very special is that the software I am 100% dependent on to generate queries, joins the fact table will all dimension tables in all cases. Mostly my queries do not include any WHERE clauses (apart from those needed for joins) only GROUP BY and HAVING. Joining 200 million rows with side tables that on average have about 50000 rows, is heavy. When I need results within 10 seconds, I believe there is a need for Enums.

One of the side tables is text with length of up to 900 characters. My question is whether I could build PostgreSQL with NAMEDATALEN  (which controls the max size of Enums) equal to 900? Or do you see any things going wrong then (like stability problems or whatever)?

Regards,

David

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Partitioned Tables Foreign Key Constraints Problem
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Using ENUM with huge NAMEDATALEN