[ASTPPCOM-462] Discuss: Change CHAR to VARCHAR in routes & outbound_routes tables Created: 20/Aug/18  Updated: 01/Apr/21  Resolved: 01/Apr/21

Status: Done
Project: ASTPP Community
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature
Reporter: alexheylin Assignee: Samir Doshi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

These tables get big quickly (71K rows per rate card for me), and account for 92% of my DB even after several months of live calls. In my testing, changing the CHAR columns to VARCHAR saves 41% of the space of both tables, that's currently 36% of my DB space saved. This seems inefficient, particularly if RAM is allocated to storing all those empty chars.

Are there any advantages to using CHAR that aren't outweighed by the saving in DB size, and thus RAM demand?

Also routes.pattern has length 40, which is twice the length of longest number expected, and seems excessive when compared to outbound_routes.pattern which has length 15? If we switch to VARCHAR, we could probably ignore this though as the extra data won't get stored.



 Comments   
Comment by alexheylin [ 20/Aug/18 ]

While less of a problem for me, there is the potential for similar improvement in the accounts table.

Comment by Samir Doshi [ 26/Aug/18 ]

That's true. We should change CHAR datatype to VARCHAR to save space and
improvements.
We noted that we will do require changes in table structure.

Best Regards

Samir Doshi
iNextrix Technologies Pvt. Ltd.
http://www.inextrix.com

Disclaimer:
The information contained in this communication is confidential and may be
legally privileged. It is intended solely for the use of the individual or
entity to whom it is addressed and others authorized to receive it. If you
are not the intended recipient you are hereby notified that any disclosure,
copying, distribution or taking action in reliance on the contents of this
information is strictly prohibited and may be unlawful. Please notify the
sender immediately and destroy all copies of this message and any
attachments contained in it.

[image: Mailtrack]
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&>
Sender
notified by
Mailtrack
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&>
08/26/18,
4:13:26 PM

On Mon, Aug 20, 2018 at 3:14 PM AlexHeylin <notifications@github.com> wrote:

> While less of a problem for me, there is the potential for similar
> improvement in the accounts table.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/iNextrix/ASTPP/issues/462#issuecomment-414259204>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AA6gcSlqn7V2m7VQ7ltDs7JGrbyB9gY3ks5uSoTmgaJpZM4WDp6b>
> .
>

Generated at Sat Feb 10 07:17:21 CET 2024 using Jira 8.13.3#813003-sha1:22ebedbb75c99b147c66f14e031dd8a2d214753a.