Hi! Is there a performance difference in searching...
# orm-help
c
Hi! Is there a performance difference in searching if a string occurs in a list versus if a boolean is true?
r
Hey @Corjen 👋 Is the boolean also a list?
c
Hey! No let me clarify a bit 🙂
We have two options, something like:
Copy code
enum SomeEnum {
  Tag1
  Tag2
}

model Something {
  tags: SomeEnum[]
}
Or:
Copy code
model Something {
  hasTag1 Boolean
  hasTag2 Boolean
}
The enum only has 4 members and not more are expected, it’s quite a large dataset so I was wondering if there are perfomance differences between the first and second option.
r
The first one seems more maintainable and ideal in this case in my opinion. It shouldn’t be that impactful on perf. I would also suggest running a sample test with your dataset 🙂
c
Cool, will do 🙂 thanks!
💯 1