<div dir="ltr"><div>I am using mtree for the same purpose and it works great. It never expire. I had loaded about 7 millions records in mtree table and there is no performance issue at all. <br><br></div>Gary<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jul 3, 2013 at 7:57 AM, Alex Balashov <span dir="ltr"><<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sure, you can do it that way.  However, htable and mtree accommodate relatively primitive data sets.<br>
<br>
Given sufficient table complexity and/or size, your best bet is to use an in-memory storage backend on the database side itself.<br>
<br>
In MySQL, this is called:<br>
<br>
   <a href="http://dev.mysql.com/doc/refman/5.7/en/memory-storage-engine.html" target="_blank">http://dev.mysql.com/doc/<u></u>refman/5.7/en/memory-storage-<u></u>engine.html</a><br>
<br>
-- Alex<div><div class="h5"><br>
<br>
On 07/03/2013 05:41 AM, Grant Bagdasarian wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hello,<br>
<br>
I need to query a database for every SIP request coming into Kamailio,<br>
but I want this to be handled as fast as possible, so I was thinking of<br>
loading the data I need in memory using the HTABLE or MTREE modules.<br>
<br>
When the SIP request is coming from one of our carriers, the called<br>
number ($rU) must be used to get the data for this called number.<br>
Normally, I would query the database, using sqlops, and pass the value<br>
of $rU as the parameter and get the column values using the $dbr<br>
variable. Can this be accomplished with HTABLE or MTREE?<br>
<br>
Also, the autoexpire parameter in HTABLE; once expired, will the data be<br>
reloaded again from the database?<br>
<br>
Thanks,<br>
<br>
<br>
Grant<br>
<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
<br>
</blockquote>
<br>
<br>
-- <br>
Alex Balashov - Principal<br>
Evariste Systems LLC<br>
235 E Ponce de Leon Ave<br>
Suite 106<br>
Decatur, GA 30030<br>
United States<br>
Tel: <a href="tel:%2B1-678-954-0670" value="+16789540670" target="_blank">+1-678-954-0670</a><br>
Web: <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.alexbalashov.com/" target="_blank">http://www.alexbalashov.com/</a><br>
<br>
______________________________<u></u>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
</blockquote></div><br></div>