[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Fast key range iteration
- To: Александр Киранов <xhaskx@gmail.com>, openldap-technical@openldap.org
- Subject: Re: Fast key range iteration
- From: Howard Chu <hyc@symas.com>
- Date: Tue, 5 May 2015 08:44:48 +0100
- In-reply-to: <CANG+hL0DYTmpvs6D9-pU+2tHg-D+m4EthmsaJp=awKOSnt2_qg@mail.gmail.com>
- References: <CANG+hL0DYTmpvs6D9-pU+2tHg-D+m4EthmsaJp=awKOSnt2_qg@mail.gmail.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0 SeaMonkey/2.37a1
Александр Киранов wrote:
Hi all!
Is there a way to iterate with all key-value pairs in LMDB database,
where all keys is in specified range?
I'm trying to use mdb_cursor_get() with MDB_SET_RANGE to search first pair.
Right.
Then I see only one way - use mdb_cursor_get() with MDB_NEXT and compare
key by memcmp().
For strict correctness you should be using mdb_cmp().
But it seems absolutely not effective.
I have no idea what that sentence means. What actual problem do you have?
Is there another solution for my task?
Thanks!
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/