On 7 Jan 2011, at 9:55pm, Alok Singh wrote:

> i think something going to have huge memory or becoming lengthy here, so
> after going
> 10000 in few sec
> next 10001 to 20000 in 1min
> next 20001 to 30000 in more than 1.5 min
> next 30001 to 40000 in more than 3 min
> next 40001 to 50000 in more than 6 min
> next 50001 to 60000 in more than 8 min
> 600001 to 65042 in 3 min

That is a very useful piece of analysis and helps us look for exactly what's 
going on.

>        For y = j To x
>            strval = Replace(yarray(y) + vbTab + yarray1(y), "'", "''")
> [snip]
>        j = x + 1
>        x = x + 10000

You have an extremely long array and are trying to access elements like 
yarray(60000) where yarray is an array of strings.  The language you're using 
is extremely bad at handling long arrays of strings: for each access it starts 
at the first element, then walks the array to get to the element you want.  The 
bigger the subscript (the number in the brackets) the longer it takes to access 
the array element.

You are keeping all your data in memory.  Don't do that.  Read a row into 
memory, write it out, then read the next row.

If that is not practical, instead of using one element of the array for each 
field, use one element of the array and store the entier row of the text file 
in it.  When you get to process that row, only then take it apart into 
individual fields in /another/ array.

The problem is, once again, nothing to do with SQLite.  You just need more 
experience to know how programming languages really work.

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to