Search found 32 matches: scopped

Return to advanced search

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

I love a lively discussion. I always learn something new.

James
by James Bott
Wed Feb 04, 2015 7:13 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

Rao,

nageswaragunupudi wrote:You modified my code.


No, I run your sample as is and I got 1.84. Then I changed my original sample and I got the same speed.

nageswaragunupudi wrote:BTW may I know the total number of records?


Is in my first message: 910404

EMG
by Enrico Maria Giordano
Wed Feb 04, 2015 6:48 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

Mr EMG

You modified my code.
For once please compile my code exactly as it is without changing even a single alphabet and then see the difference. I guarantee a difference in speed.
BTW may I know the total number of records?
Or please send me your dbf ziipped.
by nageswaragunupudi
Wed Feb 04, 2015 6:38 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

I would explain that my new sample is as fast as your. So nothing related to optimizations. :-(

EMG
by Enrico Maria Giordano
Wed Feb 04, 2015 6:28 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

Rao, Will you kindly try this sample as it is without changes? Yes, there is a speed improvement: OLD        2.20      58776 NEW         1.84      58776 This is my modified sample: REQUEST DBFCDXFUNCTION MAIN()   ...
by Enrico Maria Giordano
Wed Feb 04, 2015 6:25 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

James, Agreed, but I don't see any logical way you can search for any combination of fields in a filter without reading all the records for at least some of the combinations. I've always used conditional indexes created "on the fly" with very good results. The searches demanded by my clien...
by Enrico Maria Giordano
Wed Feb 04, 2015 6:19 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

Will you kindly try this sample as it is without changes? REQUEST DBFCDXFUNCTION MAIN()    FIELD CLIENTE    LOCAL nSec, nKey    RDDSETDEFAULT( "DBFCDX" )    FERASE( "CORSE.CDX" )        USE CORSE ...
by nageswaragunupudi
Wed Feb 04, 2015 5:52 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

Enrico, You want your user to search on any fields and combinations. Agreed, but I don't see any logical way you can search for any combination of fields in a filter without reading all the records for at least some of the combinations. I think the point is, that some filters will be optimized if th...
by James Bott
Wed Feb 04, 2015 5:42 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

James, Consider: Assuming there is an index on client, then this should be optimized: set filter to client ="A" .or. client="M" And I don't think you can do this with scopes. Assuming that the filter above could be optimized, it would only be a specific case. Imagine a dialog ful...
by Enrico Maria Giordano
Wed Feb 04, 2015 5:05 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

Rao, If there is an index on CLIENTE then SET FILTER TO CLIENTE = "A" can be fully optimized. If there is an index on UPPER(CLIENTE) then SET FILTER TO UPPER(CLIENTE) = 'A' can be fully optimized. I don't see any speed improvement in the modified sample below. :-( REQUEST DBFCDXFUNCTION MA...
by Enrico Maria Giordano
Wed Feb 04, 2015 5:00 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

Enrico,

Consider:

Assuming there is an index on client, then this should be optimized:

set filter to client ="A" .or. client="M"

And I don't think you can do this with scopes.

James
by James Bott
Wed Feb 04, 2015 4:50 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

Rao, If there is an index on CLIENTE then SET FILTER TO CLIENTE = "A" can be fully optimized. If there is an index on UPPER(CLIENTE) then SET FILTER TO UPPER(CLIENTE) = 'A' can be fully optimized. If I had an index on UPPER(CLIENTE) I wouldn't need of filters at all. I would just use scope...
by Enrico Maria Giordano
Wed Feb 04, 2015 4:44 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

Because this filter SET FILTER TO FIELD -> cliente = "A" can not be optimized at all. As I said earlier, DBFCDX provides capabilities of optimization, provided the programmer wants to avail the benefits of these capabilities. In this case we can not say DBFCDX is slow. If there is an in...
by nageswaragunupudi
Wed Feb 04, 2015 4:33 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

James,

understood. Can't test with Clipper anymore, sorry. :-(

EMG
by Enrico Maria Giordano
Wed Feb 04, 2015 3:10 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360

Re: Advice needed for reccount() in scopped and filtered dbfcdx.

Enrico,

Hmm, you can't compare with and without a filter to see optimization. It seems you would have to compare the filter compiled with xHarbour (with optimization) v.s. Clipper (without optimization).

James
by James Bott
Wed Feb 04, 2015 3:04 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Advice needed for reccount() in scopped and filtered dbfcdx.
Replies: 31
Views: 8360
Next

Return to advanced search