On using doubles as primary keys

Поиск
Список
Период
Сортировка
От Kynn Jones
Тема On using doubles as primary keys
Дата
Msg-id CAFvQaj6RuALMSxZYeoED6HBZyeCHURUHzRf7inbEuiayg0rofQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: On using doubles as primary keys  (Melvin Davidson <melvin6925@gmail.com>)
Re: On using doubles as primary keys  (John McKown <john.archie.mckown@gmail.com>)
Re: On using doubles as primary keys  (Paul A Jungwirth <pj@illuminatedcomputing.com>)
Список pgsql-general
I have some data in the form of a matrix of doubles (~2 million
rows, ~400 columns) that I would like to store in a Pg table,
along with the associated table of metadata (same number of rows,
~30 columns, almost all text).  This is large enough to make
working with it from flat files unwieldy.

(The only reason for wanting to transfer this data to a Pg table
is the hope that it will be easier to work with it by using SQL
queries to extract subsets of it, than by, e.g., writing programs
that must scan the entire matrix every time they're run.)

My plan is to add one extra column to the Pg tables to serve as
the primary key joining the data and the metadata tables
together.

One consideration that is complication the choice of primary key
is wanting to have the ability to store chunks of the data
table (not the metadata table), including the PK column, as
matrices of doubles.  In its simplest form, this would mean using
doubles as primary keys, but this seems to me a bit weird.

I'm willing to go ahead with this, but I wanted to ask for your
feedback on the whole thing.  In particular I'd like to know if
there are there standard ways for using doubles as primary keys,
and, conversely, if there are known pitfalls I should be looking
out for, but I welcome any other words of wisdom you may have on
this topic.

Thanks in advance!

kj


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: database migration question between different ubuntus and different postgresql server versions
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: On using doubles as primary keys