On 1/13/14 9:21 AM, "big stone" <stonebi...@gmail.com> wrote:


>Hello,
>
>I read the source code of sqlite and I find a lot of :
>
>
>CREATE TABLE t1(x INTEGER);
>INSERT INTO t1 VALUES(1);INSERT INTO t1 VALUES(2);
>....
>
>Wouldn't it be both an economy of coding time and a more quick upload
>process to allow Multiple inserts SYNTAX ?
>
>like :
>INSERT INTO t1 VALUES(1),(2), .... (9999);
>
>I'm not 100% certain it's in SQL standard, but the syntax seems ok for
>SQL Server , Oracle , and POSTGRESQL at least.

I can't speak to the syntax; but in my experience, preparing a single
INSERT statement and executing it multiple times in a loop is much faster
than building a script of many INSERT statements and then preparing and
executing it once.  I would imagine the same thing would apply for a
multi-row INSERT: for large amounts of data, the parsing time would kill
you.

Will



>_______________________________________________
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to