Question about command processing...

3 visningar
Hoppa till det första olästa meddelandet

Gary

oläst,
9 aug. 2009 12:54:302009-08-09
till OpenQM-OpenSource
I read about the command processor and I have some understanding about
how it works, but I was wondering if anyone could answer a question...
From the command prompt ":", I execute "SELECT SHIPPER BY NUMBER".
When this finishes I get the "command in progress" prompt "::". If I
do ANOTHER "SELECT SHIPPER BY NUMBER" command from THIS prompt, what
is actually happening (it takes a LONG time)?

GaryW

Ashley Chapman

oläst,
9 aug. 2009 13:18:082009-08-09
till openqm-o...@googlegroups.com


2009/8/9 Gary <gwal...@gmail.com>

The double colon means that there is an active select list.  The subsequent SELECT command will first do the second select, then check that each record is also in the first select list (central portion of Venn diagram).  Finally, it then makes the new list active.  This all takes time, especially if the file is imbalanced (as you suspect).


 


GaryW





--
Ashley Chapman

Gary

oläst,
9 aug. 2009 15:26:182009-08-09
till OpenQM-OpenSource
So essentially it's an "AND" operation between the two selects and
(since the selects are not in any particular order) is probably
running in O(n squared) time.

GaryW

On Aug 9, 1:18 pm, Ashley Chapman <ash.chap...@gmail.com> wrote:
> 2009/8/9 Gary <gwalb...@gmail.com>

Ashley Chapman

oläst,
9 aug. 2009 18:06:352009-08-09
till openqm-o...@googlegroups.com


2009/8/9 Gary <gwal...@gmail.com>


So essentially it's an "AND" operation between the two selects

Yep, you've got it.   If you have several SELECTS, you can generally get best performance by combining them into one command, or by ordering the SELECTS so that the first one produces the smallest number of keys.  I.E. filter out as much as you can on the first command.  It all depends on your exact situation though.

It would be really nice to have the equivalent to Oracle's cost and rule based optimisers.  And some more index options too! 

I'm exhausted from a hectic weekend.  Off to bed!


Ashley Chapman

Gene Buckle

oläst,
10 aug. 2009 09:26:192009-08-10
till OpenQM-OpenSource
On Sun, 9 Aug 2009, Gary wrote:

>
> So essentially it's an "AND" operation between the two selects and
> (since the selects are not in any particular order) is probably
> running in O(n squared) time.
>

This feels wrong to me.

I know that in D3, when I perform a select and then select again from the
"waiting" prompt, it performs the new select checking only those items
that were found in the first select.

g.

--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.

ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
http://www.scarletdme.org - Get it _today_!

Ashley Chapman

oläst,
10 aug. 2009 11:24:172009-08-10
till openqm-o...@googlegroups.com


2009/8/10 Gene Buckle <ge...@deltasoft.com>


On Sun, 9 Aug 2009, Gary wrote:

>
> So essentially it's an "AND" operation between the two selects and
> (since the selects are not in any particular order) is probably
> running in O(n squared) time.
>

This feels wrong to me.

I know that in D3, when I perform a select and then select again from the
"waiting" prompt, it performs the new select checking only those items
that were found in the first select.


Yes, Gene.  I suspect that your version is more like what happens in QM/Scarlet.  In an attempt to explain what the double colon meant, I probably misled Gary.  Thanks for expressing it in a clearer fashion. :-)

The only excuse I offer is exhaustion from a knackering weekend!



--
Ashley Chapman

Gene Buckle

oläst,
10 aug. 2009 11:48:382009-08-10
till openqm-o...@googlegroups.com
On Mon, 10 Aug 2009, Ashley Chapman wrote:

> 2009/8/10 Gene Buckle <ge...@deltasoft.com>
>
>>
>> On Sun, 9 Aug 2009, Gary wrote:
>>
>>>
>>> So essentially it's an "AND" operation between the two selects and
>>> (since the selects are not in any particular order) is probably
>>> running in O(n squared) time.
>>>
>>
>> This feels wrong to me.
>>
>> I know that in D3, when I perform a select and then select again from the
>> "waiting" prompt, it performs the new select checking only those items
>> that were found in the first select.
>
>
> Yes, Gene. I suspect that your version is more like what happens in
> QM/Scarlet. In an attempt to explain what the double colon meant, I
> probably misled Gary. Thanks for expressing it in a clearer fashion. :-)
>

S'ok. I read the original and went "Arooo?"[*] :)

> The only excuse I offer is exhaustion from a knackering weekend!
>

In the wise vernacular of my neice, "Ur doin it rong!" :)

[*] A sound made by the main character of a USAian show called Tool Time.
whenever something didn't make sense. No longer on the air, but still
funny. :)

Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden