Is CDX better than NTX?

Post Reply
Horizon
Posts: 1324
Joined: Fri May 23, 2008 1:33 pm
Has thanked: 4 times

Is CDX better than NTX?

Post by Horizon »

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,
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

NTX or CDX

Post by ukoenig »

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 :lol:
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.
User avatar
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:

Post by Antonio Linares »

Hakan,

> I suppose that xBrowse recognize the indexes to change sort order in CDX. Is it true?

Yes, XBrowse fully supports CDXs indexes.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Post by driessen »

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.
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
Horizon
Posts: 1324
Joined: Fri May 23, 2008 1:33 pm
Has thanked: 4 times

Post by Horizon »

Thank you for informations.

How Can I migrate to CDX. Is there anything to be careful?

Is Clipper 5.2e support CDX?

Thanks,
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
User avatar
fafi
Posts: 169
Joined: Mon Feb 25, 2008 2:42 am

Post by fafi »

Is Clipper 5.2e support CDX?


if you are still using Clipper, You have to use six driver for CDX and try with Blinker.

Regards
Fafi
Horizon
Posts: 1324
Joined: Fri May 23, 2008 1:33 pm
Has thanked: 4 times

Post by Horizon »

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,
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
User avatar
fafi
Posts: 169
Joined: Mon Feb 25, 2008 2:42 am

Post by fafi »

I used sixcdx.lib and machsix.lib

Regards
Fafi
User avatar
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:

Post by Enrico Maria Giordano »

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
User avatar
fafi
Posts: 169
Joined: Mon Feb 25, 2008 2:42 am

Post by fafi »

Hi Enrico !

Can I get it ?

Regards
Fafi
User avatar
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:

Post by Enrico Maria Giordano »

fafi wrote:Hi Enrico !

Can I get it ?

Regards
Fafi


I don't know. Comix was a commercial RDD and I would be very surprised if they were still selling it.

EMG
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Comix

Post by ukoenig »

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 :lol:
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.
User avatar
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

Post by Enrico Maria Giordano »

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 :lol:


Yes, but I don't know if it can be used with Clipper 5.2e.

EMG
User avatar
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Comix

Post by ukoenig »

Hello, Enrico
The Link :

http://www.grafxsoft.com/2comix.htm

Regards
Uwe :lol:
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.
User avatar
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

Post by Enrico Maria Giordano »

ukoenig wrote:Hello, Enrico
The Link :

http://www.grafxsoft.com/2comix.htm

Regards
Uwe :lol:


Great! I had completely forgotten GrafX Software.

EMG
Post Reply