[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 Best RegardsSamir Doshi Disclaimer: [image: Mailtrack] 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 |