Mike,
 
Is not as simple as that. In one case it is using the indexes and going only to 
the records that meet the criteria (using indices) and it could be Just a few, 
in the other case it is traversing through each and every record and it is the 
total number of records on the table.
 
Javier,
 
Javier Valencia, PE
O: 913-829-0888
H: 913-397-9605
C: 913-915-3137
 
From: [email protected] [mailto:[email protected]] On Behalf Of 
Mike
Sent: Friday, June 03, 2016 10:29 AM
To: [email protected]
Subject: Re: [RBASE-L] - speeding up searches in a view
 
I am surprised that doing two things takes 20 times longer rather than twice as 
long.



On Jun 3, 2016, at 9:22 AM, karentellef via RBASE-L <[email protected]> 
wrote:
Dan is right.  If you have vDate predefined, then RBase just has to do one 
thing:  Is this row > 6/3/15?   But in your first command it has to do two 
things as it goes thru each row:  what is the value of (.#date - 365), then is 
this row > that value?

Karen
 
 
 
-----Original Message-----
From: Dan Goldberg < <mailto:[email protected]> [email protected]>
To: rbase-l < <mailto:[email protected]> [email protected]>
Sent: Thu, Jun 2, 2016 5:51 pm
Subject: RE: [RBASE-L] - speeding up searches in a view
Because when you put the calculation in the command it has to evaluate it for 
each row.
 
Dan Goldberg
 
From: rbase- <mailto:[email protected]> [email protected] [ 
<mailto:[email protected]?> mailto:[email protected]] On Behalf 
Of Michael J. Sinclair
Sent: Thursday, June 2, 2016 3:48 PM
To: rbase- <mailto:[email protected]> [email protected]
Subject: [RBASE-L] - speeding up searches in a view
 
Hi all,
 
I was doing a search of a two table view with about 1 million rows.
The column I am using has an index.
 
This search was very slow.....
 
BROWSE ALL FROM viewname WHERE columname > (.#date - 365)
 
This search was almost instant
 
SET VAR vdate = (.#date - 365)
BROWSE ALL FROM viewname WHERE columname > .vdate
 
 
Why is there such a big difference?
 
Mike
 
-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to  <mailto:[email protected]> 
[email protected].
For more options, visit  <https://groups.google.com/d/optout> 
https://groups.google.com/d/optout.
-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to  <mailto:[email protected]> 
[email protected].
For more options, visit  <https://groups.google.com/d/optout> 
https://groups.google.com/d/optout.
-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to  <mailto:[email protected]> 
[email protected].
For more options, visit  <https://groups.google.com/d/optout> 
https://groups.google.com/d/optout.
-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to  <mailto:[email protected]> 
[email protected].
For more options, visit  <https://groups.google.com/d/optout> 
https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to