BookmarkSubscribeRSS Feed
Billybob73
Quartz | Level 8

Hi,

 

I 'm creating a new table in a proc sql using a table that has considerable lengths.

 

NAMETYPELENGTH
Variable125000
Variable22255
Variable3215000
Variable425000
Variable525000
Variable6215000
Variable725000
Variable8225
Variable918
Variable102255
Variable1118
Variable1225000
Variable1325000
Variable14215000
Variable1518

 

This proc sql gives the following output :

 

ERROR: Index TEMPINDX cannot be created on file WORK.'SASTMP-000000278'n because the length of the index value (15026 bytes) is too

large. The index page size (currently 32767) must be large enough to store three index values plus a small overhead

structure. Reduce the length of the index value or use the IBUFSIZE= option to increase the index page size (up to a maximum

of 32,767 bytes).

 

I alread found out that reducing these lengths solves the problem, however I'm stuck with a couple of questions as I don't understand exactly why the ERROR is happening :

1. What does 'the length of the index value'  mean in the error message ?

2. The maximum IBUFSIZE option 32,767 did not work for me. Still I got the error message.... Is there another solution apart from reducing the lengths ?

3. The input data set for the proc sql is not big at all. Only 108 records. It seems that the length of the fields influences a memory buffer. Is that right ? How to prevent this by default ?

4. What is this tmpindex and how does this relate tot the index page size ? I'm confused by the word index because I normally consider this a method to make queries faster on fields that are indexed

 

Thanks for clarifying !

Regards

B

 

 

1 REPLY 1
Patrick
Opal | Level 21

Have you already seen the SAS Note here?

 

The error message says:

"...must be large enough to store three index values plus a small overhead structure". Below code works if you set ibufsize to the maximum and the indexed variable isn't much longer than 10000 characters.

options ibufsize=32767;
proc options option=ibufsize;
run;

data test;
  length var $10000;
  do var='a','b','c';
    output;
  end;
  stop;
run;

proc sql;
  create index var on test(var);
quit;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 2023 views
  • 0 likes
  • 2 in conversation