ADS Index Limitation

ADS Index Limitation

Postby cdmmaui » Wed Sep 03, 2008 1:38 pm

I have a database that requires 19 index keys. I am using TAG within two separate files. It works fine with CDX alone, however now I am trying to switch to ADS and I am getting errors while trying to build search keys. The error is related to maximum index keys. Is there any workaround to get 19 index keys to work with ADS?
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby nageswaragunupudi » Wed Sep 03, 2008 4:37 pm

ADS supports 50 tags in a CDX file.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10295
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby cdmmaui » Wed Sep 03, 2008 5:09 pm

Where can I find the documentation that supports your statement?

Thank you,
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby George » Wed Sep 03, 2008 9:04 pm

From "Advantage Database Server A Developer's Guide" Version 8.1 book
Authors Cary Jensen and Loy Anderson; we can read in chapter 3 page 85:

"An index file that has two or more index orders is referred to as a multiple-order index file, or compound index file. A given index file can contain up to 50 index orders"
.......
.......
"A given table can have up to 15 index files"


Regards,

George
George
 
Posts: 724
Joined: Tue Oct 18, 2005 6:49 pm

Postby George » Wed Sep 03, 2008 9:25 pm

From "Advantage Database Server A Developer's Guide" Version 8.1 book
Authors Cary Jensen and Loy Anderson:
ADT Table Parameters
A) Maximum field name length: 128 Characters

B) Maximum table size: 4 gigabytes (16 exabytes using Windows NT/2000/XP/2003 NTFS or NetWare NSS file systems; 8 exabytes using Linux glibc 2.1.2 - 11+ with kernel 2.4+, 2 gigabytes with earlier Linux version).

C) Maximum number of record per table: 2.2 billion

D) Maximum record length: 64 kilobytes

E) Maximum record filter expression length: 64 kilobytes

F) Maximum index file size: 4 gigabytes (35 terabytes in Windows NT/2000/XP/2003 NTFS or NetWare NSS file systems or Linux; 2 gigabytes Linux pre-2.1.2 - 11 glibc and pre-2.4 kernel).

G) Maximum memo file size: 4 gigabytes (4 terabytes in Windows NT/2000/XP/2003 NTFS or NetWare NSS file systems or Linux).

H) Maximum single memo field size: 4 gigabytes

I) Maximum number of fields per record: Depend on the average field name length. For example, if the average field name length is 10 characters, you can have 3,256 fields. If the average field name is 40 characters, you can have 1,302 fields per table


Regards

George
George
 
Posts: 724
Joined: Tue Oct 18, 2005 6:49 pm

Postby cdmmaui » Wed Sep 03, 2008 9:49 pm

Thank You George, however I am using DBFCDX and get the error below when trying to create an index file

ADSCDX/5031 - The seek key is not the correct length
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby nageswaragunupudi » Thu Sep 04, 2008 1:01 am

Maximum length of evaluated value of key expression is 240 bytes. Maximum length of key expression itself 512 bytes.

When you move to ADS, please keep a few things in mind. Avoid Aliasing fields and your UDFs in the index expressions. Make sure your index expressions always evauluate to fixed length values and less than 240 bytes.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10295
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby cdmmaui » Thu Sep 04, 2008 3:08 am

I am not using any UDF or alias fields, here is my code, can you tell me what I am doing wrong?

INDEX ON file TAG S1 TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd ) DESCENDING
DBCLEARINDEX()
INDEX ON shipname TAG S2 TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd ) DESCENDING
DBCLEARINDEX()
INDEX ON reference TAG S3 TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd ) DESCENDING
DBCLEARINDEX()
INDEX ON consname TAG S4 TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd ) DESCENDING
DBCLEARINDEX()
INDEX ON placerec TAG S5 TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd ) DESCENDING
DBCLEARINDEX()
INDEX ON portload TAG S6 TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd ) DESCENDING
DBCLEARINDEX()
INDEX ON portdisc TAG S7 TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd ) DESCENDING
DBCLEARINDEX()
INDEX ON placedel TAG S8 TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd ) DESCENDING
DBCLEARINDEX()
INDEX ON scarrier TAG S9 TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd ) DESCENDING
DBCLEARINDEX()
INDEX ON svessel+svoyage TAG SA TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd )
DBCLEARINDEX()
INDEX ON manifest+hse TAG SB TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd )
DBCLEARINDEX()
INDEX ON vslcode+hbill TAG SC TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd )
DBCLEARINDEX()
INDEX ON DTOS(etd) TAG SD TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd ) DESCENDING
DBCLEARINDEX()
INDEX ON hbill TAG SE TO &Pdd.ocnx01 EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd ) DESCENDING
DBCLEARINDEX()
INDEX ON mbill+dststat TAG SF TO &Pdd.ocnx01b EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd )
DBCLEARINDEX()
INDEX ON serial TAG SG TO &Pdd.ocnx01b EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd )
INDEX ON bookno TAG SH TO &Pdd.ocnx01b EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd )
DBCLEARINDEX()
INDEX ON booking TAG SI TO &Pdd.ocnx01b EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd )
DBCLEARINDEX()
INDEX ON addby+file TAG SJ TO &Pdd.ocnx01b EVAL ( oMeter:Set( RecNo() ), SysRefresh(), ! lEnd ) DESCENDING
DBCLEARINDEX()


Thank You,
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby nageswaragunupudi » Thu Sep 04, 2008 3:42 am

Please try creating TAG by TAG, While testing, just use "INDEX ON <exp> TAG <tagname>" and remove eval, and TO

Check which TAG is failing
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10295
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 28 guests