Subject | Re: [firebird-support] Re: Composite vs single column keys |
---|---|
Author | Woody |
Post date | 2010-08-26T18:17:10Z |
From: "sboydlns" <sboydlns@...>
query that returns results like this. It is only of use when using
serialized storage, such as files, and wanting to read from a certain point
in the file to the end. But there still isn't anything useful in the results
once the initial starting company is processed, unless it is date based and
you are relying on everything after a certain point to be dated later. (I'm
pretty sure that's not the reason, though.)
what they have now, IMO, would be to use a floating point field as the
primary key. That way you could find the starting point and retrieve
everything with a higher key value. Adding information would simply be a
process of finding where you want it inserted and dividing the sum of the
two key (previous and next record) values by 2.
Woody (TMW)
>Maybe I'm missing something, but I can't think of any possible use for a
> Actually I don't think that will give me what I want. Consider:
>
> I want to start reading start at Company = 10 and Account = 1000. That
> means I should get all of Company 10 where Account >= 1000 and all of
> Company 11, 12, 13, ... irregardless of the value of Account.
>
> That is I should get 10-1000, 10-1001, ... and 11-0001, 11-0002, ...
query that returns results like this. It is only of use when using
serialized storage, such as files, and wanting to read from a certain point
in the file to the end. But there still isn't anything useful in the results
once the initial starting company is processed, unless it is date based and
you are relying on everything after a certain point to be dated later. (I'm
pretty sure that's not the reason, though.)
> I am implementing something like what they want. Or at least I am tryingThe simplest way to duplicate (still don't know why anyone would want to)
> to. Performance will definitely be sub-optimal but they aren't going to
> believe until they see it.
>
what they have now, IMO, would be to use a floating point field as the
primary key. That way you could find the starting point and retrieve
everything with a higher key value. Adding information would simply be a
process of finding where you want it inserted and dividing the sum of the
two key (previous and next record) values by 2.
Woody (TMW)