Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I am trying to create a table with data as follows:
For 1=1 to 1000000
NewTable:
Load $(i) as Counter
AutoGenerate 1;
NEXT
When the above code is executed its taking nearly 20 minutes to create a table with 1 million rows. Is there any other efficient way of modifying code to reduce the time taken for the creation of the above table?
Thanks,
RK
LOAD
RecNo() AS Counter
AUTOGENERATE
1000000;
Hi Petter,
Thanks for the code and Its very fast now.
Please can you tell why the looping is so slow compared to your approach?
Thanks,
RK
Petter's example generates ONE load statement that contains one million rows.
In your original example you generate 1 million load statements, which then are concatenated into one common table.
Your approach simply adds an enormous amount of processing overhead.
Hi Rakesh,
Try like this:
LOAD
RecNo() AS ID
AUTOGENERATE
n;
Ramaya.
Thanks Toni for the simple and easy to understand explanation