David
8/28/2010 7:19:00 PM
Mr. Serflaten:
Thanks again for the feedback.
I understand the proposed solutions which for the most part mimick what I'm
doing.
Your comment of :
>Not to say you'd be wasting your time, but you'd be doing some significant
>work >for very little gain (if any).
has merit, as maybe the approach I'm currently using "is" the best.
I do like Nobody's idea of using a "day structure" as a novel approach
but as previously stated don't believe is the best in this instance.
Please consider this thread closed and again thank you and everyone else
who contributed for there time and effort on my behalf.
David
"Larry Serflaten" <serflaten@gmail.com> wrote in message
news:i5avho$9eb$1@news.eternal-september.org...
>
> "David" <NoWhere@earthlink.net> wrote
>
>> For example: if the user loads two separate arrays
>> (say minute and daily data per the previous example) --> what would be
>> the
>> fastest
>> way to flag high and low sales for "EACH" day.
>>
>> As previously stated I can loop through the minute, locate each day by
>> testing for a date change, and then track Hi and Low in the dataset until
>> I
>> find the Highest or Lowest value. In this case NO Daily dataset array
>> structure would even need to be created.
>>
>> However, if I did load both minute and daily, is there a way to interface
>> the two
>> so I can more readily find the minute Highest and Lowest value for each
>> day
>> using the daily or am I wasting time and effort?
>
> Look again at the structure you posted:
>
> Type ThisDataInfo
> DT As Date
> Amount As Single
> End Type
>
> You really have no way to 'flag' any entry as there is no space in the
> structure
> for it. Assuming you have that in an array (as stated above) you'll need
> a second
> structure to hold either the Hi and Lo amount values, or their index
> positions
> for however many days. That is how you would have to 'flag' them.
>
> So the question is, can you loop through the data to build that second
> structure,
> faster than the DB engine could return the information for you?
>
> To be honest, I don't think the user could tell a difference. I would
> suspect it
> would take longer for code to execute that shows the results on the
> screen,
> than it would for either method of retieving the data.
>
> As you mentioned before, you already have the data in a DB. I would think
> you would do better to try to leverage a DB engine to your advantage,
> than try to beat it with your own custom solutions. Not to say you'd be
> wasting your time, but you'd be doing some significant work for very
> little
> gain (if any).
>
> As I said earlier, to flag your hi's and lo's you'd have to build a second
> structure to indicate which minutes were 'flagged'. You could do that
> yourself, but Nobody showed how the DB could give you the same
> information.
>
> It is still your decision as to which method is best for you, but I think
> you've found that others suggest letting the DB mine the data, as you need
> it....
>
> LFS
>
>
>
>