I always thought that its is the taxonomy_index table that remembers the taxonomy terms that are tagges to a node.
Today i had to delete all terms associated to a content types' nodes
DELETE FROM taxonomy_index where nid in (select n.nid from node n where n.type = 'article');
Was surprised to see that it doesnot delete the relationship tagging.
Then i did something like below for each field
DELETE FROM field_data_field_article_prm_subj_term where entity_type = 'node' and bundle='tma_article' and entity_id in (select n.nid from node n where n.type = 'article');
Still the rendered content shows all the terms tagged, then i did below for each field
DELETE FROM field_revision_field_article_prm_subj_term where entity_type = 'node' and bundle='tma_article' and entity_id in (select n.nid from node n where n.type = 'article');
Why is the taxonomy_index still there when there are field_data_xxx and field_revision_xxx ?
Comments
bump
bump
I'm curious myself.
I'm curious myself.
Contact me to contract me for D7 -> D10/11 migrations.
bump
bump
bump
bump
Don't bump. Never bump. It's
Don't bump. Never bump. It's rude and just makes people ignore you.
taxonomy_index is a denormalization table, duplicating the data slightly for faster query performance.
Drupal has these one-off tables (taxonomy_index, forum_index....)
I disagree. Bumping when it's
I disagree. Bumping when it's still on the top page isn't cool, but once it starts to get dropped down below everything, it's much less likely it will get seen. That's what a bump is for.
Contact me to contract me for D7 -> D10/11 migrations.
Sorry if the "bumps" have
Sorry if the "bumps" have troubled you in any way.
But please note that they were bumped at intervals of more than 24 hours,. without which the post would have sinked deep inside unanswered. Additionally I am not advertising anything or wont make a penny out of the post.
Secondly, thanks for your insight on the table