Is CDX better than NTX?
Is CDX better than NTX?
Hi,
As my subject, should I change my databases to CDX Index?
If yes, Is there any easy method to convert my programs?
I suppose that xBrowse recognize the indexes to change sort order in CDX. Is it true?
Thanks,
As my subject, should I change my databases to CDX Index?
If yes, Is there any easy method to convert my programs?
I suppose that xBrowse recognize the indexes to change sort order in CDX. Is it true?
Thanks,
Regards,
Hakan ONEMLI
Harbour & MSVC 2022 & FWH 23.04
Hakan ONEMLI
Harbour & MSVC 2022 & FWH 23.04
NTX or CDX
Hello,
To use CDX instead of NTX, is the better option.
If you open a database, the CDX-Index is opend as well.
I use ORDCREATE and ORDCONDSET
-------------------------------------------
Sample 1 :
Old Style :
------------
Index on upper(archiv_no) + DESCEND(str(n_year) + str(n_month)) to "FAKT1" UNIQUE
New Style :
( .T. included in the Index-array means UNIQUE )
----------------------------------------------------------
ORDCREATE( ,"FAKT1","LOWER(archiv_no) + DESCEND(str(n_year) + STR(n_month)", ;
{|| LOWER(archiv_no) + DESCEND(str(n_year) + STR(n_month) } , .T. )
-----------------------------------------------------------
-----------------------------------------------------------
Sample 2 :
// Index-direction Down = .T.
Old Style
-----------
Index on DESCEND(str(n_year) + invoice_no + archiv_nr) ;
to "FAKT3" UNIQUE
New Style
------------
ORDCONDSET( , , , , , , , , , , .T. ) // DESCEND
ORDCREATE( ,"FAKT3","STR(n_year) + invoice_no + archiv_no", ;
{|| STR(n_year) + invoice_no + archiv_no } , .T. ) // UNIQUE
Be careful, to use soemething like : UPPER(Name)
In case of < ÖÄÜ > at the beginning of the name, it doesn' work.
You have to use LOWER !!!!
Regards
Uwe
To use CDX instead of NTX, is the better option.
If you open a database, the CDX-Index is opend as well.
I use ORDCREATE and ORDCONDSET
-------------------------------------------
Sample 1 :
Old Style :
------------
Index on upper(archiv_no) + DESCEND(str(n_year) + str(n_month)) to "FAKT1" UNIQUE
New Style :
( .T. included in the Index-array means UNIQUE )
----------------------------------------------------------
ORDCREATE( ,"FAKT1","LOWER(archiv_no) + DESCEND(str(n_year) + STR(n_month)", ;
{|| LOWER(archiv_no) + DESCEND(str(n_year) + STR(n_month) } , .T. )
-----------------------------------------------------------
-----------------------------------------------------------
Sample 2 :
// Index-direction Down = .T.
Old Style
-----------
Index on DESCEND(str(n_year) + invoice_no + archiv_nr) ;
to "FAKT3" UNIQUE
New Style
------------
ORDCONDSET( , , , , , , , , , , .T. ) // DESCEND
ORDCREATE( ,"FAKT3","STR(n_year) + invoice_no + archiv_no", ;
{|| STR(n_year) + invoice_no + archiv_no } , .T. ) // UNIQUE
Be careful, to use soemething like : UPPER(Name)
In case of < ÖÄÜ > at the beginning of the name, it doesn' work.
You have to use LOWER !!!!
Regards
Uwe

Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Antonio Linares
- Site Admin
- Posts: 42537
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 77 times
- Contact:
Hello,
There is still another reason why CDX is better than NTX.
For each NTX-index of a file, a filehandle is opened.
If you have a file with 5 NTX-indexes, you have 6 filehandles opened.
In case of CDX, only one filehandle is opened of all the indexes.
So, CDX reduces the number of filehandles needed.
I have an application with 41 DBF-files of which 39 do have a CDX-file. This means 80 filehandles per user. All the CDX-files contain 660 indexes. One of my customers have 30 users. That means 2400 filehandles opened on the server. In case I had used NTX, that would mean more than 21000 filehandles.
There is still another reason why CDX is better than NTX.
For each NTX-index of a file, a filehandle is opened.
If you have a file with 5 NTX-indexes, you have 6 filehandles opened.
In case of CDX, only one filehandle is opened of all the indexes.
So, CDX reduces the number of filehandles needed.
I have an application with 41 DBF-files of which 39 do have a CDX-file. This means 80 filehandles per user. All the CDX-files contain 660 indexes. One of my customers have 30 users. That means 2400 filehandles opened on the server. In case I had used NTX, that would mean more than 21000 filehandles.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.09 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.09 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
Hi Fafi,
I use Clipper 5.2e and Blinker 5.1 for my old programs. I have compiled my old programs with xHarbour and FWH using preprocessors. So I use the same source. I just want to know that can i use CDX in Clipper 5.2e. There are DBFCDX.LIB in my Clippers LIB directory. I thought I can use it.
Thanks,
I use Clipper 5.2e and Blinker 5.1 for my old programs. I have compiled my old programs with xHarbour and FWH using preprocessors. So I use the same source. I just want to know that can i use CDX in Clipper 5.2e. There are DBFCDX.LIB in my Clippers LIB directory. I thought I can use it.
Thanks,
Regards,
Hakan ONEMLI
Harbour & MSVC 2022 & FWH 23.04
Hakan ONEMLI
Harbour & MSVC 2022 & FWH 23.04
- Enrico Maria Giordano
- Posts: 8756
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Horizon wrote:Hi Fafi,
I use Clipper 5.2e and Blinker 5.1 for my old programs. I have compiled my old programs with xHarbour and FWH using preprocessors. So I use the same source. I just want to know that can i use CDX in Clipper 5.2e. There are DBFCDX.LIB in my Clippers LIB directory. I thought I can use it.
Thanks,
Clipper 5.2e DBFCDX was very buggy. I used Comix at the time.
EMG
- Enrico Maria Giordano
- Posts: 8756
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Comix
Hello Enrico,
as far as i know, the comix-rdd has been included
in the last Clipper-version 5.3b ( no extra product ).
Regards
Uwe
as far as i know, the comix-rdd has been included
in the last Clipper-version 5.3b ( no extra product ).
Regards
Uwe

Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Enrico Maria Giordano
- Posts: 8756
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Re: Comix
ukoenig wrote:Hello Enrico,
as far as i know, the comix-rdd has been included
in the last Clipper-version 5.3b ( no extra product ).
Regards
Uwe
Yes, but I don't know if it can be used with Clipper 5.2e.
EMG
Comix
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Enrico Maria Giordano
- Posts: 8756
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact: