Skip to content

Use custom field character count for segment calculator #238

Description

@ajohn25

Is your feature request related to a problem? Please describe.
The segment calculator currently uses an estimate for the character count of a custom field. However, when values for the custom field are loaded, it's much more accurate to calculate based on those values instead.

Describe the solution you'd like

  • When a custom field value isn't filled in yet, use the current estimatation
  • Once the value is filled in, use an avg length of the actual value to get the character count

Describe alternatives you've considered
Using the length of the 1st custom field value found (this may be preferred for performance, but it looks like an AVG(LENGTH((custom_fields::json)->>'field')) in prod currently is pretty quick

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions