[OpenSIPS-Users] Postgres driver and COMMIT

Jerry Norton jerry at vapps.com
Mon Sep 8 19:19:23 CEST 2008


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20080908/8fb8b4d9/attachment.htm 


More information about the Users mailing list