Hi, I need to make some decisions as to the DB structure.
I am using filament and spatie translations and other plugins that use the json column.
I have a headless Laravel API for mobile and web.
I have a DB with many tables/models and pivot tables between them. My app needs to be ready for multi-lingual
for example a recipe table with: title, description. recipe steps table with text instructions per step. the question is will using spatie translate for these fields compromise the query performance to much when doing text search queries??
For example search: "Pork Belly" in the recipe title and description.
If everyone is using it maybe it's working fine. I didn't find info about performance issues in real life production examples.
thanks
For example, if you need to search what file belongs to what user - that would get complicated. You would have to search JSON arrays and it's slower to do so.
But other than slowness and potential issues at a later day (or even coding challenges) - you should be okay. I would still prefer a new table with Model, but JSON is okay.
Hi, I need to make some decisions as to the DB structure. I am using filament and spatie translations and other plugins that use the json column. I have a headless Laravel API for mobile and web.
I have a DB with many tables/models and pivot tables between them. My app needs to be ready for multi-lingual for example a recipe table with: title, description. recipe steps table with text instructions per step. the question is will using spatie translate for these fields compromise the query performance to much when doing text search queries?? For example search: "Pork Belly" in the recipe title and description.
If everyone is using it maybe it's working fine. I didn't find info about performance issues in real life production examples. thanks
What do you think about using JSON format for storing array of images related to the exact entry?
It's possible, but not great.
For example, if you need to search what file belongs to what user - that would get complicated. You would have to search JSON arrays and it's slower to do so.
But other than slowness and potential issues at a later day (or even coding challenges) - you should be okay. I would still prefer a new table with Model, but JSON is okay.