pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Ron <rjpeace@earthlink.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-performance@postgresql.org
Subject: Re: [GENERAL] Creation of tsearch2 index is very slow
Date: Fri, 20 Jan 2006 17:29:46 -0500
Message-ID: <7.0.1.0.2.20060120172335.039f5e20@earthlink.net> (raw)
In-Reply-To: <20060120221655.GA22581@uio.no>
References: <43D0ED57.1020608@gmx.de>
<17454.1137771321@sss.pgh.pa.us>
<20060120170452.GC31908@svana.org>
<26153.1137784469@sss.pgh.pa.us>
<20060120201036.GE31908@svana.org>
<26583.1137788505@sss.pgh.pa.us>
<20060120205132.GF31908@svana.org>
<26958.1137791955@sss.pgh.pa.us>
<20060120213754.GG31908@svana.org>
<27264.1137793817@sss.pgh.pa.us>
<20060120221655.GA22581@uio.no>
At 05:16 PM 1/20/2006, Steinar H. Gunderson wrote:
>On Fri, Jan 20, 2006 at 04:50:17PM -0500, Tom Lane wrote:
> > I wonder if there is a way to improve on that.
>
>Ooh, the farthest pair problem (in an N-dimensional vector space, though).
>I'm pretty sure problems like this has been studied quite extensively in the
>literature, although perhaps not with the same norm. It's known under both
>"farthest pair" and "diameter", and probably others. I'm fairly sure it
>should be solvable in at least O(n log n).
If the N-dimensional space is Euclidean (any <x, x+1> is the same
distance apart in dimension x), then finding the farthest pair can be
done in at least O(n).
If you do not want the actual distance and can create the proper data
structures, particularly if you can update them incrementally as you
generate pairs, it is often possible to solve this problem in O(lg n) or O(1).
I'll do some grinding.
Ron
view thread (38+ messages) latest in thread
Message-ID: <7.0.1.0.2.20060120172335.039f5e20@earthlink.net> Permalink: ../7.0.1.0.2.20060120172335.039f5e20@earthlink.net/ Also on: postgresql.org/message-id/7.0.1.0.2.20060120172335.039f5e20@earthlink.net ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-performance@postgresql.org Cc: rjpeace@earthlink.net, tgl@sss.pgh.pa.us Subject: Re: [GENERAL] Creation of tsearch2 index is very slow In-Reply-To: <7.0.1.0.2.20060120172335.039f5e20@earthlink.net> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox