Re: [PERFORM] GIST versus GIN indexes for intarrays

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Rusty Conover <rconover(at)infogears(dot)com>, psql performance <pgsql-performance(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Subject: Re: [PERFORM] GIST versus GIN indexes for intarrays
Date: 2009-02-13 17:20:58
Message-ID: 4854.1234545658@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Teodor Sigaev <teodor(at)sigaev(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Lister 2009-02-13 17:57:11 Re: Database corruption help
Previous Message Andrew Chernow 2009-02-13 17:06:09 Re: PQinitSSL broken in some use casesf

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2009-02-13 17:35:29 Re: I/O increase after upgrading to 8.3.5
Previous Message Alexander Staubo 2009-02-13 16:31:25 Re: I/O increase after upgrading to 8.3.5