<blockquote>
<p>Storing 800k objects that have a short lifetime is just not what relational databases are designed for. Well I mean acting as a cache in general is not really what they are designed for...</p>
</blockquote>
<p>Just to add one more data point:</p>
<p>800k seemed a bit too pessimistic, actual numbers in the prototype are in the max 300k range, and that's still based on a human-readable format. The string compresses down to 20k-50k (factor 6 - 15).</p>
<p>As a purely binary format, at least 21 bytes are needed to store all information representing a single change in a diff result file:</p>
<ul>
<li>operation: 2 bit (values: create/modify/delete)</li>
<li>object type: 2 bit (values: node/way/relation)</li>
<li>deletion_skipped: 1 bit (true/false)</li>
<li>old_id: 64 bit</li>
<li>new_id: 64 bit</li>
<li>version: 32 bit<br>
(Note: actual sequence of rows needs to be preserved!)</li>
</ul>
<p>I guess there's a number of different options to store this kind of data.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2201#issuecomment-484669790">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMGTRR4KF4EQDJJ2PLPRDIDBANCNFSM4HEAKOPQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLPQV2MILVEUX6VT4WDPRDIDBANCNFSM4HEAKOPQ.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"PERSON","message":"@mmd-osm in #2201: \u003e Storing 800k objects that have a short lifetime is just not what relational databases are designed for. Well I mean acting as a cache in general is not really what they are designed for...\r\n\r\nJust to add one more data point:\r\n\r\n800k seemed a bit too pessimistic, actual numbers in the prototype are in the max 300k range, and that's still based on a human-readable format. The string compresses down to 20k-50k (factor 6 - 15).\r\n\r\nAs a purely binary format, at least 21 bytes are needed to store all information representing a single change in a diff result file:\r\n\r\n- operation: 2 bit (values: create/modify/delete)\r\n- object type: 2 bit (values: node/way/relation)\r\n- deletion_skipped: 1 bit (true/false)\r\n- old_id: 64 bit\r\n- new_id: 64 bit\r\n- version: 32 bit\r\n(Note: actual sequence of rows needs to be preserved!)\r\n\r\nI guess there's a number of different options to store this kind of data.\r\n"}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/openstreetmap-website/issues/2201#issuecomment-484669790"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2201#issuecomment-484669790",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2201#issuecomment-484669790",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>