Re: Some indexing advice for a Postgres newbie, please? - Mailing list pgsql-general

From Arthur Silva
Subject Re: Some indexing advice for a Postgres newbie, please?
Date
Msg-id CAO_YK0XfBRP4FbcyskL04AWymwMaNeYvM_8dyYJxmGvEE_gzhg@mail.gmail.com
Whole thread Raw
In response to Re: Some indexing advice for a Postgres newbie, please?  (Brian Dunavant <brian@omniti.com>)
List pgsql-general

On Thu, Feb 19, 2015 at 2:14 PM, Brian Dunavant <brian@omniti.com> wrote:
You should consider a BitString.
http://www.postgresql.org/docs/9.4/static/datatype-bit.html

On Thu, Feb 19, 2015 at 11:10 AM, brian <brian@meadows.pair.com> wrote:
>
> Hi folks,
>
> I have a single-user application which is growing beyond the
> fixed-format data files in which it currently holds its data, I need a
> proper database as the backend. The front end is written using Lazarus
> and FreePascal under Linux, should anyone feel that makes a
> difference. The database will need to grow to around 250,000 records.
>
> My problem is with the data field which is the (unique) key. It's
> really a single 192-bit integer (it holds various bits of bitmapped
> data) which I currently hold as six 32-bit integers, but can convert
> if needed when transferring the data.
>
> How would you advise that I hold this field in a Postgres database,
> given the requirement for the whole thing to be a unique key? The
> first 64 bits change relatively infrequently, the last 128 bits will
> change with virtually every record. The last 128 bits will ALMOST be
> unique in themselves, but not quite. :(
>
> Thanks,
>
> Brian.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


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

I suggest the bytea type.

pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: Some indexing advice for a Postgres newbie, please?
Next
From: Adrian Klaver
Date:
Subject: Re: Issue dumping schema using readonly user