No subject
Mon Sep 1 20:02:59 CEST 2008
postgres's libpq.so ... so the auto-commit would be set afaik by the
application using it.
Easy solution-- I added the following line after the update:
Avp_db_query("Commit");
After 1,000,000 calls, the query time does not change anymore.
Jerry
-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:bogdan at voice-system.ro]
Sent: Friday, September 12, 2008 5:57 AM
To: jerry at vapps.com
Cc: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] Postgres driver and COMMIT
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