[ALL] let's think about Query Language for 2.0

Ruslan Zasukhin sunshine at public.kherson.ua
Sat May 17 09:07:54 CDT 2003


on 5/17/03 12:11 AM, Keith DeLong at delong at redcort.com wrote:

>> Note, that Valentina will need build RB array at first, then return it to
>> you. May be RB will be able do this really fast...probably yes.
>> 
>> But what this brings to you?
>> I mean having of result as Array or Collection?
> 
> Actually I've been thinking mostly of dictionaries. I've been toying with a
> wrapper 'Result dictionary' to load from a vCursor. Here's the most recent
> structure I'm experimenting with:
> 
> Result Dictionary
>   The Key/Value Pairs are Order and Fieldname  //order = column number
>   
>   Properties     
>       Field1 as Dictionary
>           The Key/Value Pairs are Row and Value
>       Field2 as Dictionary
>           The Key/Value Pairs are Row and Value
>       Field3 as Dictionary
>           The Key/Value Pairs are Row and Value
>       Etc...
> 
> Here's the power as I ponder:
> (1) Because dictionaries use hash tables, I can write functions that find
> random values and tell me if a random value is in a table nearly
> instantaneously independently of the data set size. The idea is that I no
> longer have to sequentially loop through the data in a cursor.

But note, that now your data MUST be in RAM, so this cannot be huge set of
data. 

I also not sure that this will work faster of cursor looping or binary
search on cursor. Assume cursor have million records. If they sorted you can
do binary search and find any record in 20 steps. ONLY 20 records will be
read from server or from HDD.

Now if we put this to Directory, all million records must be sent to RAM of
your computer, only then you can get SPEED as you say.
I think this can have sense if you do then thousands of searches on this
directory.

In any case this idea is interested.
 
> (2) Dictionaries hold variants so I can load each field dictionary with its
> native data type. This has all sorts of implications for using data one
> moment and viewing it the next. If I need all strings, the conversion of
> variants in by RB seems fast and transparent.
> 
> (3) I've segmented the data in a logical way for me -- I can build methods
> that subloop through just the Field names, the individual field
> dictionaries, etc. with great ease.
> 
> Is there any merit to this idea or am I just abusing dictionaries as data
> containers??  :-)

Hard to say. I do not see for now great advantages.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list