FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour CDX TOO SLOW
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
CDX TOO SLOW
Posted: Thu May 09, 2013 08:10 PM

I have an archive of 61819 Records

I must index it on seven indexes

When Imade (cdbf)->(OrdSetFocus(n)) and refresh() the xbrowse it is too slow

How I can resolve this problem

I'm using a portable Pc with 8GBRam Winseven

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 85
Joined: Mon Apr 18, 2011 02:32 AM
Re: CDX TOO SLOW
Posted: Fri May 10, 2013 02:18 AM

Sivio...

DBF/CDX originally work base in physical platform.
the problem has came to me long time ago. from the time that, i migration to Oracle database.

Just a good idea. maybe you have to cast about to use other database like SQL Server, Oracle, DB2 etc.... :)

Mulyadi

Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: CDX TOO SLOW
Posted: Fri May 10, 2013 02:23 PM

Do you have a filter or scope set?

Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: CDX TOO SLOW
Posted: Fri May 10, 2013 03:54 PM

I use cdx to index the dbf then I use dbsetfilter but the filter is activate then when the user made a search not when I open the file
I'm afraid it not run ok or run slowly because perhaps xbrowse not run ok
On old app 16 bit I used lbx( wbrowse) no problem

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: CDX TOO SLOW
Posted: Fri May 10, 2013 04:18 PM
Silvo

Set Scope to... is much faster than dbSetFilter.
Rick Lipkin

Code (fw): Select all Collapse
#Include "Ord.ch"

cStockno := "12345"

Select Invoice
Set Order to Tag Stockno

Set Scope to cStockno
Seek cStockno

xbrowse()
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: CDX TOO SLOW
Posted: Fri May 10, 2013 05:09 PM

If the filter is active while the browse is updating it might be the reason it is slow.
If you use a filter just for the search then why use a filter at all, a locate would be better?
Another issue that comes up is the number of deleted records that may have to be skipped during the browse painting.

Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: CDX TOO SLOW
Posted: Fri May 10, 2013 05:17 PM

Is this related to the incremental search question in another thread.
If so the the problem is trying to use wildseek() in a filter. It does not allow any optimization against the indexes.
When the browse does a go top and then tries to paint the rows it has to compare every record to match filter instead of using the indexes to solve filter logic.

Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: CDX TOO SLOW
Posted: Sat May 11, 2013 09:15 AM

the problem I have seven Get control and I wish filter on these get on dbf and I not Know how make it

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 80
Joined: Tue Mar 25, 2008 09:03 PM
Re: CDX TOO SLOW
Posted: Sat May 11, 2013 07:54 PM

did you try

index on DESTATOF to "TEMP" FOR (DESTATOF = "ARRIVATA" .OR. DESTATOF = "IN LAVORAZIONE" ) MEMORY

I had the same problem with xbrowse (30 pc in the network and for now 15000 records, use dbf and ntx) and it's  ok. In fact I can set up filters and indexes in a free way and prg responds quickly.

Stefano

FWH 14.11 + xHarbour + bcc582

Continue the discussion