[Asterisk-Users] realtime excessive database queries

Matthew Boehm mboehm at cytelcom.com
Sun May 22 10:27:06 MST 2005


The queries you speak of are not native to realtime. They are part of pbx as
a whole. And yes, the core programmers are aware of it and yes, they have
admitted they don't like it.

> Why not just load all the extensions into memory, and then have a
> mechanism to mark an extension as stale and only then reload from the
> database?  Seems that with a basic caching mechanism you get all the
> benefits of realtime without the downside of taking a performance hit
> like it does now when having to go to the database so much.
> 
> If I'm reading the code right the extensions are all in a linked list.
>  So it seems you could just add another item to the list to hold the
> state of the extension, and when accessing the first item in the list
> check the state.  If it's stale and realtime is in use, update the
> extension from the database and restart at the top of the list.
> 
> Chris

_Matthew





More information about the asterisk-users mailing list