<table><tr><td style="">dvratil added a comment.
</td></tr></table><br /><div><div><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>This table is used, so that each resource can save additionla data for a collection, so far I know it is mostly requested via collectionid and a given type. Aka:<br />
 <tt style="background: #ebebeb; font-size: 13px;">select value from CollectionAttributeTable where type="type" and collectionId=?</tt></p></blockquote>

<p>The most common query is actually</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">SELECT collectionId, type, value FROM CollectionAttributeTable WHERE type IN (....) AND collectionId IN (....) ORDER BY collectionId ASC</pre></div>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>One type is defined in one attributeclass see. src/core/*attribute.(cpp|h) and than src/core/protocolhelper.cpp and src/core/attributefactory.cpp doing the magic.</p></blockquote>

<p>Where the types are defined in code is irrelevant, we are looking into how to deal with this on the DB level. The implementation should not stand in the way of db optimization (otherwise we wouldn't get anywhere :-))</p></div></div><br /><div><strong>TASK DETAIL</strong><div><a href="https://phabricator.kde.org/T7846" rel="noreferrer">https://phabricator.kde.org/T7846</a></div></div><br /><div><strong>To: </strong>pablo, dvratil<br /><strong>Cc: </strong>knauss, dvratil, kde-pim, pablo<br /></div>