[OpenSIPS-Devel] Location table structure - account_contact_idx
Donat Zenichev
donat.zenichev at gmail.com
Wed Oct 2 07:37:00 EDT 2019
"Is there a special reason why you are using "sql-only"? We've only
carried it to 2.4 just to make the transition easier." -
No there were no special reasons for sticking to this, I guess it's
completely okay to use this mixed "write-back" mode, and furthermore
this looks much better in terms of throughput.
"But, in my opinion, single-instance-sql-write-through is net
superior, since:" -
I guess you meant "single-instance-sql-write-back"?
"* the WRITE operations (REGISTER processing) are just as slow as with
sql-only, since both modes wait for the WRITE to finish before
replying to the UAC,
thus guaranteeing the registration cannot be lost anymore" -
yeah I completely agree with you, sql-only mode is not that effective
in terms of speed, so we are going to test write-back way of handling
this.
Thanks for your attention!
On Wed, Oct 2, 2019 at 12:29 PM Liviu Chircu <liviu at opensips.org> wrote:
> On 02.10.2019 12:12, Donat Zenichev wrote:
>
> modparam("usrloc", "working_mode_preset", "sql-only")
>
> Is there a special reason why you are using "sql-only"? We've only
> carried it to 2.4
> just to make the transition easier. But, in my opinion,
> "single-instance-sql-write-through"
> is net superior, since:
>
> * the WRITE operations (REGISTER processing) are just as slow as with
> "sql-only", since both
> modes wait for the WRITE to finish before replying to the UAC, thus
> guaranteeing the registration
> cannot be lost anymore
>
> * the READ operations (INVITE processing) are much faster than "sql-only",
> as the data is cached
>
> Aside from these design considerations, I see no issues with creating that
> unique index. To help
> you a bit, the actual SELECT query only fetches the "username" + "domain"
> columns. So I think your
> composite index covers that and optimizes the lookup.
>
> Cheers,
>
> Liviu Chircu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> I also have one last question, is it a bad practice to include indexes
> (unique/constraint keys) into OpenSIPS table structures?
> Such as I did with a location table (of OpenSIPS 2.4 version):
> "UNIQUE KEY `account_contact_idx`
> (`username`,`domain`,`contact`,`callid`,`contact_id`)"
>
> Would this have any superfluous impact on the system?
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
--
Best regards,
Donat Zenichev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20191002/7c7b1bda/attachment.html>
More information about the Devel
mailing list