Re: json accessors

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: json accessors
Date: 2012-12-05 19:45:32
Message-ID: 20121205194532.GM27424@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2012-12-05 10:49:35 -0800, Josh Berkus wrote:
>
> >> *) xmlpath/jsonpath do searching (and decomposition) but are very
> >> clunky from sql perspective and probably absolutely nogo in terms if
> >> GIST/GIN. postgres spiritually wants to do things via operators and
> >> we should (if possible) at least consider that first
>
> Why is it a nogo for GiST? Ltree works, doesn't it? If we only support
> equality lookups in what way is a JSON doc different from a collection
> of ltree rows?

The space requirement for the paths are quite different. Its not that
hard to build indexing support, its hard to build efficient support.

The more you hide from postgres (i.e. behind a single very complex
operator/function) the harder it is for the planner to detect whether
your expression is indexable or not.

> We'd probably want to use SP-GiST for better index size/performance, but
> I don't see that this is impossible. Just some difficult code.

I don't immediately see why SP-Gist would be be beneficial. What kind of
access structure do you have in mind?

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-12-05 19:46:14 Re: PITR potentially broken in 9.2
Previous Message Josh Berkus 2012-12-05 19:43:17 Re: ALTER TABLE ... NOREWRITE option