Code: Select all
( 6 + number of columns + sum of all columnl length ) <= 255 )
Accidentally we detected that the limit to create an index is much higher now although we had problems with such an index in a productional environment.
It happened that we created an additional index (non unique) on a table in a customer SqlBase 12.0 database for performance reasons. The index contained several columns, and since the index could be created, we overlooked that it was a bit longer than 255.
Primarily this worked well and the performance was significantly better, but on the customer site we had afterwards some database server crashes and each time this new index was corrupt. So we decided not to use anymore this large-sized index.
I can’t give you a reliable testcase which leads to the index corruption, but without that index there were and are no problems and with that large-sized index was always a crash after one or few days
Some simple tries with SqlBase 11.6, 11.7 and 12.0 showed that the formula now must be similar as:
Code: Select all
x + ( 2 * number of columns ) + ( sum of all column length )
Code: Select all
create table xindextest ( col1 nvarchar (400) , col2 nvarchar (194) );
create index xie1indextest on xindextest (col1 asc, col2 asc ) ;
or
create table xindextest ( col1 varchar (800) , col2 varchar (389) );
create index xie1indextest on xindextest (col1 asc, col2 asc ) ;
Please tell us the correct actual rule for calculating the index size and its allowed maximum size and update the SQLBase documentation.
And, very important, please check also, whether there are known problems with such large indexes or is there a recommendation not to use such large-sized indexes althought they can be created?
Regards
Günter
Giscon Systems GmbH