dbTalk Databases Forums  

Rushmore: GOTO TOP and GOTO BOTTOM

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss Rushmore: GOTO TOP and GOTO BOTTOM in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gene Wirchenko
 
Posts: n/a

Default Rushmore: GOTO TOP and GOTO BOTTOM - 12-22-2004 , 10:12 PM






I have a question that has been bothering me for a while. WHY
are
goto top
and
goto bottom
not Rushmore-optimisable, yet
locate
is?

ISTM that it would have been easy enough to do.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.

Reply With Quote
  #2  
Old   
Josh Assing
 
Posts: n/a

Default Re: Rushmore: GOTO TOP and GOTO BOTTOM - 12-22-2004 , 11:12 PM






Goto top
and goto bottom
have no optimizable features....

The index that's set defines top/bottom -- there's not "thinking" involved..

On Wed, 22 Dec 2004 20:12:22 -0800, Gene Wirchenko <genew (AT) mail (DOT) ocis.net> wrote:

Quote:
I have a question that has been bothering me for a while. WHY
are
goto top
and
goto bottom
not Rushmore-optimisable, yet
locate
is?

ISTM that it would have been easy enough to do.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.

---
Remove x's to send.


Reply With Quote
  #3  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: Rushmore: GOTO TOP and GOTO BOTTOM - 12-22-2004 , 11:35 PM



Josh Assing <xjoshx (AT) jassing (DOT) com> wrote:

Quote:
Goto top
and goto bottom
have no optimizable features....

Why would a plain
locate
be optimisable then? Depending on whether the index is ascending or
descending,
locate
is logicaly equivalent to
goto top
or
goto bottom

It is this discrepancy that has me wondering.

[snipped previous]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
  #4  
Old   
Neil Waterworth
 
Posts: n/a

Default Re: Rushmore: GOTO TOP and GOTO BOTTOM - 12-23-2004 , 02:53 PM



I believe Rushmore only kicks in when a FOR clause is used with single-table
commands. From VFP help,

"In its simplest form, Rushmore speeds the performance of single-table
commands using FOR clauses that specify sets of records in terms of existing
indexes."

I know that with FilterConditions set, SET DELETED ON, etc, GOTO could be
optimised to find which record "top" or "bottom" is, but looks like it was
never done. From the above quote from the help, does LOCATE FOR only specify
a single record rather than a recordset, or does it internally specify a
recordset to VFP for use with CONTINUE?

In the case of a clause-free LOCATE, I guess LOCATE followed by CONTINUE is
the same as GO TOP followed by SKIP, so looks like it could be optimised but
they just haven't got round to it yet. I see your point.

Cheers,
Neil

"Gene Wirchenko" <genew (AT) mail (DOT) ocis.net> wrote

Quote:
Josh Assing <xjoshx (AT) jassing (DOT) com> wrote:

Goto top
and goto bottom
have no optimizable features....


Why would a plain
locate
be optimisable then? Depending on whether the index is ascending or
descending,
locate
is logicaly equivalent to
goto top
or
goto bottom

It is this discrepancy that has me wondering.

[snipped previous]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.



Reply With Quote
  #5  
Old   
Dan Freeman
 
Posts: n/a

Default Re: Rushmore: GOTO TOP and GOTO BOTTOM - 12-25-2004 , 11:17 PM



LOCATE is scoped. GOTO isn't.

Dan

Gene Wirchenko wrote:
Quote:
I have a question that has been bothering me for a while. WHY
are
goto top
and
goto bottom
not Rushmore-optimisable, yet
locate
is?

ISTM that it would have been easy enough to do.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.



Reply With Quote
  #6  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: Rushmore: GOTO TOP and GOTO BOTTOM - 12-26-2004 , 12:28 PM



"Dan Freeman" <spam (AT) microsoft (DOT) com> wrote:

Quote:
LOCATE is scoped. GOTO isn't.
locate
and
goto top
are doing the exact same thing: finding the first record.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
  #7  
Old   
Cy Welch
 
Posts: n/a

Default Re: Rushmore: GOTO TOP and GOTO BOTTOM - 12-26-2004 , 06:11 PM



Gene Wirchenko wrote:
Quote:
"Dan Freeman" <spam (AT) microsoft (DOT) com> wrote:


LOCATE is scoped. GOTO isn't.


locate
and
goto top
are doing the exact same thing: finding the first record.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.
While they are getting to the same ent result they are doing it
differently. Locate is Rushmore optimized and go top is not. Locate
uses the index if an order is set. If no order is set and you actually
want the first physical record then go top might be the faster of the two.

--
Cy Welch
Senior Programmer
MetSYS Inc
http://www.metsysinc.com


Reply With Quote
  #8  
Old   
Dan Freeman
 
Posts: n/a

Default Re: Rushmore: GOTO TOP and GOTO BOTTOM - 12-27-2004 , 10:33 AM



Gene Wirchenko wrote:
Quote:
"Dan Freeman" <spam (AT) microsoft (DOT) com> wrote:

LOCATE is scoped. GOTO isn't.

locate
and
goto top
are doing the exact same thing: finding the first record.

And one uses a scope while the other doesn't.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.