It might also be done by keeping a last-revision table. Then you'd only
select 1 record from that, and up the number.


On Thu, Apr 22, 2010 at 5:34 PM, Chris W <4rfv...@cox.net> wrote:

> Johan De Meersman wrote:
>
>> On Thu, Apr 22, 2010 at 1:34 PM, Carsten Pedersen <cars...@bitbybit.dk
>> >wrote:
>>
>>
>>
>>>  Wouldn't that strategy cause problems if one or more rows have been
>>> deleted in the meantime? (i.e. sequence numbers 1-4 have been created,
>>> row
>>> 2 has been deleted - new sequence number would be 4).
>>>
>>>
>>>
>>
>> Yeps. I'm none too sharp today, apparently. Max() it is.
>>
>>
>>
>
> That may not be an issue in this case.  Since it sounds like he is keeping
> a revision history, I wouldn't be surprised if he plans on not allowing the
> deleting of records, unless of course all of the revision history for a
> given file Cluster/File are deleted.  If that is the case the count would
> work fine.  If that is not the case, max may not work either since if the
> last revision record has been deleted then using max will give faulty data
> as well.  Seems the only way for something like this to work is if you keep
> the full revision history.  Although I suppose that if you were to keep say
> the most recent  X revisions then the last revision would always be in the
> table and max could work where count would not always.
>
> Chris W
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=vegiv...@tuxera.be
>
>


-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

Reply via email to