Re: More then 1600 columns?

Поиск
Список
Период
Сортировка
От Dmitriy Igrishin
Тема Re: More then 1600 columns?
Дата
Msg-id AANLkTi=wON2eeGEgtCJ6rBzxqZceQQoCKW-mmJU+VqSD@mail.gmail.com
обсуждение исходный текст
Ответ на Re: More then 1600 columns?  (Peter Bex <Peter.Bex@xs4all.nl>)
Ответы Re: More then 1600 columns?  (Peter Bex <Peter.Bex@xs4all.nl>)
Re: More then 1600 columns?  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-general
Hey Peter,

Unfortunately, there is no indexes on arrays (only on expressions).
With hstore we can easily create GiST index for effective access.

2010/11/12 Peter Bex <Peter.Bex@xs4all.nl>
On Fri, Nov 12, 2010 at 10:17:50AM +0300, Dmitriy Igrishin wrote:
> Hey Mark,
>
> Yeah, I can't imagine an entity in a real project even with more than 100
> columns. Its rare case.
> But if you entities (rows/tuples) of some class (table) can contains
> variable
> set of columns (properties) you can look at hstore contrib module.

What can also work extremely well is storing the data in an array.
If you need to access the array based on more meaningful keys you could
store key/index pairs in another table.

This approach only works well if you have multiple arrays with the same
layout.  You probably also need to build up your query dynamically if
you need to access variable numbers of datapoints.

Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                       -- Donald Knuth

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



--
// Dmitriy.


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

Предыдущее
От: Peter Bex
Дата:
Сообщение: Re: More then 1600 columns?
Следующее
От: Peter Bex
Дата:
Сообщение: Re: More then 1600 columns?