%% /index-example public
new-index myindex key-as "positive integer"
set-number i
start-loop use i start-with 0 repeat 1000000
number-string i to key
set-string data=key
write-index myindex key (key) value data
end-loop
start-loop use i start-with 0 repeat 1000000
number-string i to key
read-index myindex equal (key) status st value data
if-true st not-equal GG_OKAY
@Could not find key <<p-out key>>
else-if
@Found data <<p-out data>> associated with key <<p-out key>>
end-if
delete-string key
end-loop
%%
Copied!