Re: [HACKERS] [PATCH] kNN for SP-GiST - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: [HACKERS] [PATCH] kNN for SP-GiST
Date
Msg-id CAPpHfdsDCPJ0v+MEhSsZmtt38KW3eYqXG0oodRv0OmieXQiiRw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [PATCH] kNN for SP-GiST  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Responses Re: [HACKERS] [PATCH] kNN for SP-GiST
List pgsql-hackers
On Thu, Aug 30, 2018 at 12:30 PM Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:
> On Thu, Aug 30, 2018 at 12:17 PM Alexander Korotkov
> <a.korotkov@postgrespro.ru> wrote:
> > # Current patch (use list)
> > x     run 1 run 2 run 3
> > 0.1    1206  1230  1231
> > 0.01   2862  2813  2802
> > 0.003 13915 13911 13900
>
> Sorry, I didn't explain what these tables means.  There are times in
> milliseconds for 3 runs of spgist_bench($x, $x)

Right, performance regression appears to be caused by queue memory
context allocation.  I've tried to apply the same approach that we've
in GiST: allocate separate memory context for queue only at second
rescan call.  And it appears to work, there is no measurable
regression in comparison to master.

Patch v8
x     run 1 run 2 run 3
0.1     680   660   662
0.01   1403  1395  1508
0.003  6561  6475  6223

Revised version of patch is attached.  I've squashed patchset into one
patch.  Later I'll split it into fewer parts before committing.  I'm
going to also make some benchmarking of KNN itself: GiST vs SP-GiST.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment

pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: [HACKERS] [PATCH] kNN for SP-GiST
Next
From: Alvaro Herrera
Date:
Subject: Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -roption)