i use the mtree module for about 5 million records.... does htable able to handle it as well?
On Fri, Feb 17, 2012 at 10:18 AM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Hello,
On 2/16/12 2:51 PM, Javier Gallart wrote:
Hello Uri
I had similar needs and I found the ndb_redis module more suited for that type of task. Instead of a tree you have a hash like this: tname tprefix tvalue. If you do a hget nts $avp(DID) and you get a not null value you have found your exact match. It works very well for me and the time it takes for that "query" is barely noticeable. Of course redis does not address items like persistence, etc the same way a rdbms does.
for hash tables in config, the alternative is using htable module. Then the selection is done on exact match, no prefix matching. mtree is suitable for storing keys that are composed from a limited set of characters (like numbers, 0-9 digits only), otherwise becomes too memory consuming. For keys that are composed from any character and need exact match, hash table structures are more suitable, no matter if it is via htable module or something else like redis.
Message: 1 Date: Thu, 16 Feb 2012 12:54:50 +0200
From: Uri Shacked <ushacked@gmail.com> Subject: [SR-Users] how to match exact string value in mtree To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
Users Mailing List" <sr-users@lists.sip-router.org> Message-ID: <CAMMbDhTFNXAE-K88=AeMjO7AnA_QJV3Ajj3AH-AxemXN3ze6HQ@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
I am using Mtree to match prefix numbers, some of them starts with 0 or characters like D for example. so, the mtree param is like this: