[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    [GENERAL] Is it possible to create an index without keeping the indexed data in a column?
From:       Larry White <ljw1001 () gmail ! com>
Date:       2014-07-31 19:47:07
Message-ID: CAMdbzVj0ss+HhYZwWyOgffKJYa3cor_JKyCTRiUAbP-feS4NoQ () mail ! gmail ! com
[Download RAW message or body]

Hi,

I would like to create a GIN index on a set of JSON documents. Right now
I'm storing the data in a JSONB column. The current index looks like this:

CREATE INDEX document_payload_idx
  ON document
  USING gin
  (payload jsonb_path_ops);

The index is pretty small, but the actual data takes up a *lot* of space.
Is there a way to get Postgres to index the table *as if* the JSON were
there, but not actually put the data in the table? I could either store the
docs elsewhere and keep a reference, or compress them and put them in the
table in compressed form as a blob.

Thanks much for your help.

Larry

[Attachment #3 (text/html)]

<div dir="ltr">Hi,<div><br></div><div>I would like to create a GIN index on a set of \
JSON documents. Right now I&#39;m storing the data in a JSONB column. The current \
index looks like this:</div><div><br></div><div><div>CREATE INDEX \
document_payload_idx</div> <div>   ON document</div><div>   USING gin</div><div>   \
(payload jsonb_path_ops);</div></div><div><br></div><div>The index is pretty small, \
but the actual data takes up a <i>lot</i> of space. Is there a way to get Postgres to \
index the table <i>as if</i> the JSON were there, but not actually put the data in \
the table? I could either store the docs elsewhere and keep a reference, or compress \
them and put them in the table in compressed form as a blob.</div> \
<div><br></div><div>Thanks much for your help.</div><div><br></div><div>Larry  \
</div><div><br></div><div><br></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic