[asterisk-dev] Realtime behavior questions ...

Miguel Molina mmolina at millenium.com.co
Tue Aug 18 09:29:01 CDT 2009


Jeff LaCoursiere escribió:
> On Tue, 18 Aug 2009, Kai Hoerner wrote:
>
>   
>> Tilghman Lesher schrieb:
>>     
>>>> 1- Same query is performed more than once:
>>>>
>>>> For example: the query below regarding the priority "3" from extension
>>>> "102" of context "sip" gets performed 3 times... and the same happens
>>>> with prior steps(priorities).
>>>>
>>>> SELECT * FROM extensions WHERE exten = '102' AND context = 'sip' AND
>>>> priority = '3'
>>>>         
>>> Yes, that's correct.  It's not optimal, but due to the dialplan 
>>> architecture,
>>> it's somewhat unavoidable.  A possible optimization would be to cache the
>>> results of queries for some short period of time.
Well even if the app doesn't make the cache, MySQL can do the job for 
you if you enable the query cache and give it enough memory to save some 
of them in RAM, or the table itself.

Just my two cents.

-- 
Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center




More information about the asterisk-dev mailing list