[PATCH] WIP: indexing for <= and >=

Aaron Haslett aaronhaslett at catalyst.net.nz
Wed Mar 20 04:30:56 UTC 2019


Here's version 2 of <= and >= indexing patch:

  * bug fixes
  * bumping index version to trigger reindex
  * new LDB version due to adding index_format_fn field to schema syntax
    structure

Testing was done on a 300,000 record DC with and without the patch to
find what speedup the patch achieved:

  * Join time reduced from 3186s to 1446s
  * Manual replication call with no data replicated reduced from 4s to 1s
  * Manual replication call with 200 record replicated reduced from 6.5s
    to 2s

On 19/03/19 2:12 PM, Aaron Haslett via samba-technical wrote:
> Sorry, I forgot to say why we're doing this.  We want to be able to
> greatly speed up "uSNChanged >= x" queries which are used during
> replication.  Testing on a DC with 300,000 records showed a speed up
> from ~4s to ~0.2s.  The patch only supports integers on LMDB for now.
>
> On 19/03/19 12:42 PM, Aaron Haslett via samba-technical wrote:
>> Work in progress implementation of <= and >= indexing.  Adds
>> iterate_range to LDB API and uses it for indexing. Modifications to come
>> because right now this patch modifies a core LDB type which will
>> probably break things.  I'll change it soon to add a new ordered integer
>> type with a new OID.
>>
>>
>> CI: https://gitlab.com/catalyst-samba/samba/pipelines/52460313
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: indexed_comparison_v2.patch
Type: text/x-patch
Size: 66539 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190320/15912b71/indexed_comparison_v2.bin>


More information about the samba-technical mailing list