<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 5, 2009, at 10:07 AM, Bertrand Mansion wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><blockquote type="cite">1. Tags are stored inefficiently (I can't think of a way to store them<br></blockquote><blockquote type="cite">that is better for every use)<br></blockquote><br>What do you mean by "every use" ?<br><br>If you are interested in reading about tags and SQL, here are some pointers:<br><a href="http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html">http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html</a><br><a href="http://laughingmeme.org/2005/04/07/in-lieu-of-the-promised-article-on-tags-and-sql/">http://laughingmeme.org/2005/04/07/in-lieu-of-the-promised-article-on-tags-and-sql/</a><br></span></blockquote></div><div><br></div><div>When Greg says, "Every use" he means that Drupal allows tags and taxonomy terms in general to be used for a lot of metadata related purposes. It's possible to optimize the storage and retrieval mechanism for specific use cases (like user-specific flickr-style tags, or hierarchical categorization), but the optimizations for those use cases are at odds with each other. What works for one will make the others punishingly inefficient. Thus, Drupal currently uses a 'best-compromise' schema that allows it to capture as much information as possible (hierarchy, weight, association, etc.) and relies on caching at a later point to smooth out hot spots.</div><div><br></div><div>There may well be further improvements that can be eked out, and there may be opportunities for optimization that have been missed -- and there may even be a case to be made for splitting taxonomy into real "tags" and "hierarchical category" so that the system can be better optimized. But I'm not sure that you're really clear on how Drupal actually works under the hood; the article you pointed to explicitly described Drupal's tag storage schema and outlined its advantages. If you go back and read the article, it's the "Toxi Solution."</div><div><br></div><div><br></div><div>--Jeff Eaton</div></body></html>