21.03.2024, 08:23
When the tags on an object are changed, which is updated faster? For instance, when adding a tag on an object, which will happen first between these two options?
I'm asking the question because I'm conceiving a web app that might sometimes add/remove a lot of tags from a lot of objects. So, I want the JavaScript code to send an HTTP request to a .Lp endpoint that will fetch what are the current tags of the modified objects. In that context, I was wondering what would be the best practice in that .lp file
SELECT tagcache FROM objects WHERE id in (...)
orĀ
SELECT object, tag FROM object in (...)
- Append the tag in the "tagcache" column of the corresponding row of the table "objects"
- Add a new row in the "objecttags" table, containing the ID of the object + the tag just added
I'm asking the question because I'm conceiving a web app that might sometimes add/remove a lot of tags from a lot of objects. So, I want the JavaScript code to send an HTTP request to a .Lp endpoint that will fetch what are the current tags of the modified objects. In that context, I was wondering what would be the best practice in that .lp file
SELECT tagcache FROM objects WHERE id in (...)
orĀ
SELECT object, tag FROM object in (...)