Speed Test not work (pt2)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Speed Test not work (pt2)

Richard-118
Well,

Did this:

sqlite3 test2.db
        create Table T (A, B, C );
        .separator ,
        .import 'sqtest2.txt' T

It looks like it working, but the file size is still
4K and not 170 Megs.

Please note:
I exported this database as a Tab delimiter file,
then as a Comma, delimiter file...

** Got it to import, however it only imports the first record
ie:

sqlite> select * from T;
-180,90,NaN
sqlite>

There's a few more hundred thousands.....
is there suppose to be some kinda of loop statement
like repeat again..

TKS-




Richard

--

I will not be pushed, filed, stamped,
indexed, briefed, debriefed, or numbered!
My life is my own - No. 7

Reply | Threaded
Open this post in threaded view
|

Re: Speed Test not work (pt2)

Dennis Cote
Richard Nagle wrote:

> Well,
>
> Did this:
>
> sqlite3 test2.db
>     create Table T (A, B, C );
>     .separator ,
>     .import 'sqtest2.txt' T
>
> It looks like it working, but the file size is still
> 4K and not 170 Megs.
>
> Please note:
> I exported this database as a Tab delimiter file,
> then as a Comma, delimiter file...
>
> ** Got it to import, however it only imports the first record
> ie:
>
> sqlite> select * from T;
> -180,90,NaN
> sqlite>
>
> There's a few more hundred thousands.....
> is there suppose to be some kinda of loop statement
> like repeat again..
>
> TKS-
>
>
>
>
> Richard
>
Richard,

Here is a trace of the execution on my machine with a sample file that
has only 2 lines.

C:\Documents and Settings\DennisC>sqlite3 test2.db
SQLite version 3.2.7
Enter ".help" for instructions
sqlite> create table t(A,B,C);
sqlite> create index I on T(A);
sqlite> .separator ,
sqlite> .import test2.csv T
sqlite> .mode column
sqlite> .header on
sqlite> select * from T;
A           B           C
----------  ----------  ----------
-180        90          NaN
200         50          103.9
sqlite>

My CSV file has the following two lines:

-180,90,NaN
200,50,103.9

I suspect there must be something strange about your CSV file. If you
zip it up and send it to me I will give it a try on my end.

Dennis Cote


Reply | Threaded
Open this post in threaded view
|

Re: Speed Test not work (pt2)

Jens Miltner
In reply to this post by Richard-118

Am 01.10.2005 um 06:58 schrieb Richard Nagle:

> Well,
>
> Did this:
>
> sqlite3 test2.db
>     create Table T (A, B, C );
>     .separator ,
>     .import 'sqtest2.txt' T
>
> It looks like it working, but the file size is still
> 4K and not 170 Megs.
>
> Please note:
> I exported this database as a Tab delimiter file,
> then as a Comma, delimiter file...
>
> ** Got it to import, however it only imports the first record
> ie:
>
> sqlite> select * from T;
> -180,90,NaN
> sqlite>
>
> There's a few more hundred thousands.....
> is there suppose to be some kinda of loop statement
> like repeat again..

Are you sure your text file has the correct line-endings? From a  
quick look at the shell sources, it looks like the shell expects  
native line-endings for the imported file. If the line-endings are  
not the native endings, the entire file may be interpreted as a  
single line, skipping everything past the first column values...

</jum>