Subject | Re: [IBO] Running total column |
---|---|
Author | Eyal |
Post date | 2005-02-09T03:02:53Z |
--- In IBObjects@yahoogroups.com, Robert martin <rob@c...> wrote:
Thanks for the reply.
The idea certainly isn't dumb. It should work just fine, but as you
noted it's slow for data sets that aren't small. The efficiency is
O(n^2) compared to O(1) of a "normal" query.
Of course caching and other optimizations can mitigate some of the
effect, but still the query is noticably slower with big datasets.
Eyal.
> Hi Eyalyour
>
> I don't know if this is a dumb idea or not, but couldn't you change
> query to something like...yy.pk)
>
> Select pk, Date, Desc, Amount (Select Sum(Amount) FROM xx Where pk <
> FROM xx yy;small
>
> Seems like a slow way to do it but it would be simple and OK for
> data sets.Rob,
Thanks for the reply.
The idea certainly isn't dumb. It should work just fine, but as you
noted it's slow for data sets that aren't small. The efficiency is
O(n^2) compared to O(1) of a "normal" query.
Of course caching and other optimizations can mitigate some of the
effect, but still the query is noticably slower with big datasets.
Eyal.