[SR-Users] Database Insert

Alex Balashov abalashov at evaristesys.com
Tue Feb 16 22:31:04 CET 2016


On 02/16/2016 04:27 PM, Daniel W. Graham wrote:

> Well I assume either way would work, is there that big of performance
> hit by using sql_query?

That depends on how long the INSERT statement takes to return. :-) In 
principle, it shouldn't be a big deal.

sql_query_async() is just a wrapper around something very similar to the 
mqueue/rtimer example I gave in the previous post. It's just more 
streamlined.

As far as whether there's a performance hit, that's a complex 
discussion. Any external I/O wait incurs some delay, but whether it's 
significant or whether it's worth doing anything about it is hard to say.

As it happens, I just wrote an article on this topic last night:

http://blog.csrpswitch.com/tuning-kamailio-for-high-throughput-and-performance/

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/



More information about the sr-users mailing list