[OpenSIPS-Users] Postgres driver and COMMIT

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Sep 12 11:56:47 CEST 2008


Hi Jerry,

I think your question is DB type dependent - opensips is just running 
the queries. So you probably have to search for the answer in the 
postgres docs.

Are you using the exact table format as defined by opensips DB scripts?


Regards,
Bogdan

Jerry Norton wrote:
>
> Using postgres, I tried to ‘borrow’ the gw table which I wasn’t using. 
> It is preloaded with about 10 rows of gateways. I use the dm column to 
> keep a count each time the gateway returns a ‘busy’.
>
> After running tests, I see a growing delay in selecting from the 
> table. The time to select grows from sub millisecond to > 100 ms. 
> Analyzing the table, I see the number of index pages grows to 
> thousands (table is still 10 active rows).
>
> I only select from the table and ‘update gw set dm = dm+1’ .
>
> avp_db_query("update gw set dm = dm +1 where 
> ip_addr='$(ruri{uri.host})'");
>
> Do I need to create a stored procedure so I can perform a select ? or 
> issue ‘commit’ after each update?
>
> Thanks.
>
> Jerry
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   





More information about the Users mailing list