Skip to content

Should we consider db indexing commonly queried fields? (memory optimization idea) #29

@KalobTaulien

Description

@KalobTaulien

I've noticed that wagtail-ab-testing is using about 60mb of memory locally and it scales up to about 150mb on some servers. For servers with lower memory, it'd be great to get this number down as much as possible.

https://github.com/torchbox/wagtail-ab-testing/blob/1ed69c764ed92e7495676ae34e1a5d6422977401/wagtail_ab_testing/models.py#L81

https://github.com/torchbox/wagtail-ab-testing/blob/1ed69c764ed92e7495676ae34e1a5d6422977401/wagtail_ab_testing/models.py#L77

If these are being queried often and there are a lot of tests, would we benefit from adding db_index=True to these fields?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions