[gnome-db] execute raw sqlite statements

Hi Vivien,

I'm facing a performance problem when I'm inserting ~20k items on a table.
Say I've got a long sql transaction string like

INSERT INTO sym_type (type_type, type_name) VALUES ('macro', 'g_marshal_value_peek_boolean'); INSERT INTO sym_type (type_type, type_name) VALUES ('macro', 'g_marshal_value_peek_char');

I need the quickest way to insert them into the table.
I don't find on libgda a method to speak directly with SQLite, and I'm 'forced' to use GdaStatement(s) to process the string and then execute them. I'm not interested in using objects or particular infos about the sql I'm going to execute.

When using the cmd line with sqlite3 I get:

pescio tal:/tmp$ time sqlite3 foodb < debug_sql.log

real	0m0.600s
user	0m0.452s
sys	0m0.008s

on the contrary using libgda it takes ages, about 50-60 seconds.
It would be really great if you could provide an API to have direct access to db engine. It would of course risky for user because it has no control on errors, sql correctness etc, but it seems to me the only way to have speed. Otherwise I'll be forced to bypass libgda and invoke the cmd line, which I would prefer to avoid because various problems, like dependencies on sqlite etc.

thanks and regards,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]