I had a similar problem back in the day, except it was backwards.
Asterisk was fast as hell when accessing postgres but everything sucked.
Check your indexes to make sure you aren't indexing stuff you don't need
to index, and that you are indexing what needs to be.
Also, have you tried doing those queries through isql? Since isql uses
the unixODBC bindings to connect, that would be a good place to check to
see if it's the odbc bindings or just asterisk.
On Mon, 15 May 2006, Sean Cook wrote:
> I am running unixODBC to connect to postgres for your realtime data for
> things like call forwarding, dnd and have noticed a significant delay when
> running the realtime application. Has anyone else encountered this?
>
> Even from the CLI if I do "realtime load cf_data exten 4501" it
lags for
> almost 2 full seconds before I get the result set back.
>
> Queries directly to the database from anything else are almost
> instantaneous...
>
> In the dial plan...
> exten => s,1,RealTime(cf_data,exten,4501,cf_) <-- this is the point
where it
> lags...
> exten => s,2,GoToIf...
>
> Any tips or suggestions?
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
Aaron Daniel
Computer Systems Technician
Sam Houston State University
amdtech@shsu.edu
(936) 294-4198