Re: [PERFORM] GIST versus GIN indexes for intarrays - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PERFORM] GIST versus GIN indexes for intarrays
Date
Msg-id 4854.1234545658@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PERFORM] GIST versus GIN indexes for intarrays  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-hackers
Teodor Sigaev <teodor@sigaev.ru> writes:
>> seems to me that we ought to get rid of intarray's @> and <@ operators
>> and have the module depend on the core anyarray operators, just as we
>> have already done for = and <>.  Comments?

> Agree, will do. Although built-in anyarray operators have ~N^2 behaviour while
> intarray's version - only N*log(N)

Really?  isort() looks like a bubble sort to me.

But in any case, a pre-sort is probably actually *slower* for small
numbers of array elements.  I wonder where the crossover is.  In
principle we could make the core implementation do a sort when working
with a sortable datatype, but I'm unsure it's worth the trouble.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Andrew Chernow
Date:
Subject: Re: PQinitSSL broken in some use casesf
Next
From: John Lister
Date:
Subject: Re: Database corruption help