[Users] AVPPOPS preformace question (OpenSER 1.1.x)
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Wed Feb 28 18:09:24 CET 2007
Hi Mike,
definitely use the second one as you do only one DB query. See:
http://www.openser.org/docs/modules/1.2.x/avpops.html#AEN205
-> avp_db_load("$ruri/username", "a");
regards,
bogdan
Mike O'Connor wrote:
> Hi Guys
>
> What is going to be faster:
>
> if (avp_db_load("$ruri/username", "$avp(s:callfwdimmediate)")) {
> ....
> };
> if (avp_db_load("$ruri/username", "$avp(s:callfwdbusy)")) {
> ....
> };
> if (avp_db_load("$ruri/username", "$avp(s:callfwdnoanswer)")) {
> ....
> };
>
> or (if it works):
>
> avp_db_load("$ruri/username", "*");
> if( is_avp_set("$avp(s:callfwdimmediate)")) {
> ....
> };
> if( is_avp_set("$avp(s:callfwdbusy)")) {
> ....
> };
> if( is_avp_set("$avp(s:callfwdnoanswer)")) {
> ....
> };
>
> If the second was valid I would have thought it would be quicker.
>
> Thanks
> Mike
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
>
More information about the Users
mailing list