<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I realise they're epoch times, it just seems a little odd to have them instead of database native date/time types. I wondered if there was a compatibility reason or something...</div><div><br></div><div>Number of times accessed makes it easy to sweep for assets that were accessed once and then discarded, which is going to be by far the most common case for assets that can be deleted. It also I think provides a nice second level of safety that you're not about to delete something that was in heavy use until some point in time. Even for a table of 1 million entries, we're talking about 4MB of data added. Heck, use a 16-bit integer, cap the count at 65536, it's only 2MB of data and still works for my main use case.</div><br><div><div>On 15 Jan 2009, at 17:24, Charles Krinke 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; "><div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The integers for create_time and access_time are "epoch times", where the beginning of the epoch is 1/1/70.<br><br>To convert one uses the mysql function from_unixtime(create_time) or from_unixtime(access_time) to see a YY-MM-DD-HH-MM-SS format.<br><br>On OSGrid, we now have about 1,000,000 entries in the assets table consuming about 50 GBytes. Of those 1,000,000 entries, about half have create_time == 0. It looks like the earliest is around the beginning of November, 2008 when the logic to write create_time and access_time became operational.<br><br>I look at that and think that have access_time and create_time is a really good thing. I am not sure I could support number of times accessed as these seem sufficient to me at this point, but perhaps I am being myopic.<br><br>Charles<br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold; ">From:</span></b><span class="Apple-converted-space"> </span>J Ross Nicoll <<a href="mailto:jrn2005@cs.st-andrews.ac.uk">jrn2005@cs.st-andrews.ac.uk</a>><br><b><span style="font-weight: bold; ">To:</span></b><span class="Apple-converted-space"> </span><a href="mailto:opensim-dev@lists.berlios.de">opensim-dev@lists.berlios.de</a><br><b><span style="font-weight: bold; ">Sent:</span></b><span class="Apple-converted-space"> </span>Thursday, January 15, 2009 7:37:16 AM<br><b><span style="font-weight: bold; ">Subject:</span></b><span class="Apple-converted-space"> </span>Re: [Opensim-dev] Opensim database management - garbage collection<br></font><br>Any chance of a number of times accessed field for assets, in addition <span class="Apple-converted-space"> </span><br>to the access_time field?<br><br>While I'm looking at the assets table, is there any specific reason <span class="Apple-converted-space"> </span><br>why creation/access times are stored as integers rather than using <span class="Apple-converted-space"> </span><br>actual date & time types?<br><br>On 15 Jan 2009, at 00:24, Mike Mazur wrote:<br><br>> Hi,<br>><br>> On Wed, 14 Jan 2009 22:22:09 +0000<br>> Ai Austin <<a ymailto="mailto:ai.ai.austin@googlemail.com" href="mailto:ai.ai.austin@googlemail.com">ai.ai.austin@googlemail.com</a>> wrote:<br>><br>>> I wonder if someone can summarise for me the way in which Opensim<br>>> manages old inaccessible assets...<br>><br>> From what I understand, nothing is done to old inaccessible assets.<br>> There is some difficulty in determining which assets are inaccessible.<br>> The reasons include:<br>><br>> - assets can be referenced in scripts by UUID (so I heard)<br>> - assets may be referenced by regions not currently online<br>><br>> In a grid where you control all the regions and databases, it should <span class="Apple-converted-space"> </span><br>> be<br>> feasible to write a tool that can discover inaccessible assets.<br>><br>>> I.e. if someone uploads a texture, perhaps uses<br>>> it on an object that is then deleted, and then delete a texture, is<br>>> it removed from the database... or can it persist and be there<br>>> forever?<br>><br>> AFAIK the texture remains in the DB forever.<br>><br>> Mike<br>> _______________________________________________<br>> Opensim-dev mailing list<br>><span class="Apple-converted-space"> </span><a ymailto="mailto:Opensim-dev@lists.berlios.de" href="mailto:Opensim-dev@lists.berlios.de">Opensim-dev@lists.berlios.de</a><br>><span class="Apple-converted-space"> </span><a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br><br>The University of St Andrews is a charity registered in Scotland : No <span class="Apple-converted-space"> </span><br>SC013532<br><br><br><br>_______________________________________________<br>Opensim-dev mailing list<br><a ymailto="mailto:Opensim-dev@lists.berlios.de" href="mailto:Opensim-dev@lists.berlios.de">Opensim-dev@lists.berlios.de</a><br><a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br></div></div></div>_______________________________________________<br>Opensim-dev mailing list<br><a href="mailto:Opensim-dev@lists.berlios.de">Opensim-dev@lists.berlios.de</a><br><a href="https://lists.berlios.de/mailman/listinfo/opensim-dev">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br></div></span></blockquote></div><br><div> <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; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>The University of St Andrews is a charity registered in Scotland : No SC013532</div><div><br></div></div></span><br class="Apple-interchange-newline"> </div><br></body></html>