Hello Iņaki,<div><br></div><div>I had much the same traffic, and with a good index that wouldn't be a problem, IMHO. </div><div>You could also load the table in memory, can't be faster than that.</div><div><br></div>
<div>Of course, doing it in the config script is faster, but it limits your flexibility... just a thought...</div><div>I even got the rate and created a "custom" cdr for each call. we had around 4k concurrent calls at that time (like 5 years ago)</div>
<div><br></div><div>Anyway, good luck!</div><div><br></div><div>David<br><br><div class="gmail_quote">On Mon, Jun 6, 2011 at 2:52 PM, Iņaki Baz Castillo <span dir="ltr"><<a href="mailto:ibc@aliax.net">ibc@aliax.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">2011/6/6 David Villasmil <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>>:<br>
<div class="im">> I connected to mysql and ran something like:<br>
> select * from routes where '$rU' like concat(areacode,'%') order by<br>
> len(areacode) desc limit 1;<br>
<br>
</div>Hi David, that would work indeed, but I prefer not to saturate the DB<br>
with such a query which cannot use table indexes. My kamailio handles<br>
2000-3000 concurrent calls and such calls come from callcenters so<br>
they are very "aggressive" (maybe 200-300 calls in the same second),<br>
so querying the database with a low performance query is not an option<br>
in my case.<br>
<br>
Thanks.<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">Iņaki Baz Castillo<br>
<<a href="mailto:ibc@aliax.net">ibc@aliax.net</a>><br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">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/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br></div>