Store percentage value as integer
Hi,
I realised once again how awesome Drizzle is! I want to store percentage value as integer. I ended up with this:
For my use case, it is correct as I don't want to store more than 2 decimals. Using the type decimal is inconvenient as it is stored as string with the Postgres driver. Hence this choice.
But my question is about the caveats of this technique. Does the in & out conversion affect the performance in a noticeable way?
2 Replies