On Thu, 2006-09-14 at 17:12 +0930, Lewis Baker wrote:
> I had a similar problem during devlopment of the PerforcePlugin where
> the call to get_youngest_rev_in_cache() was adding a 1-2 second overhead
> on large Perforce repositories. I ended up working around the problem by
> indexing on the 'time' field instead of the 'rev' field, however this
> has introduced its own problems
> (see http://trac-hacks.org/ticket/659#comment:3).
> 
> It would be much better to index using a numerical comparison on the
> 'rev' field as mentioned above, but from my cursory reading of the
> documentation I don't think this type of index is supported in SQLite.
> 
> Is there another more portable way to achieve this numerical sort for
> version control system plugins that can safely assume integer revisions?
> 

Just off the top of my head (completely untested and untried), you could
create an extra column (e.g. int_rev) and add a trigger which populates
it with the int form of the rev column. As I understand it SQLite
supports triggers in some form so that might be possible.

-- 

Russ


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/trac-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to