|
Sqlite odbc driver
|
|||
---|---|---|---|
#18+
Привет всем , ситуация следующая, использую данный драйвер для доступа к БД SQlite прочитав в ветке о том что возможен пакетный запрос,стал пробовать но выдает ошибку, насколько понимаю драйвер не позволяет. Хотя So far it has been tested with SQLite 2.8.17 and SQLite 3.7.16.1 on Windows NT/2000 in MS Excel 97 (MSQUERY) with SQLite database files created on Linux. Support for Win64 exists for both SQLite 2.x and SQLite 3.x versions of the driver, but this has been only partially tested. It also runs on Linux with unixODBC 2.[0-2].x and with libiodbc 3.[05].x. в соседней ветке прочел что,Множественные VALUES поддерживаются начиная с 3.7.11 .в той же ветке прочел что можно использовать конструкцию Код: sql
возможно ли использовать данную конструкцию , если в Код: sql
Пример кода Код: vbnet
... |
|||
:
Нравится:
Не нравится:
|
|||
24.04.2013, 15:52 |
|
Sqlite odbc driver
|
|||
---|---|---|---|
#18+
aduka05adm, почему нет? В цикле же просто строка формируется, а только потом выполняется, если строка сформирована правильно то все должно работать ... |
|||
:
Нравится:
Не нравится:
|
|||
24.04.2013, 17:37 |
|
Sqlite odbc driver
|
|||
---|---|---|---|
#18+
в данной конструкции не обязательно наличие? Код: sql 1.
на самом деле проблема решилась , оказывается надо было все занести в транзакцию и скорость записи увеличивается, http://www.sqlite.org/speed.html Test 1: 1000 INSERTs CREATE TABLE t1(a INTEGER, b INTEGER, c VARCHAR(100)); INSERT INTO t1 VALUES(1,13153,'thirteen thousand one hundred fifty three'); INSERT INTO t1 VALUES(2,75560,'seventy five thousand five hundred sixty'); ... 995 lines omitted INSERT INTO t1 VALUES(998,66289,'sixty six thousand two hundred eighty nine'); INSERT INTO t1 VALUES(999,24322,'twenty four thousand three hundred twenty two'); INSERT INTO t1 VALUES(1000,94142,'ninety four thousand one hundred forty two'); PostgreSQL: 4.373 MySQL: 0.114 SQLite 2.7.6: 13.061 SQLite 2.7.6 (nosync): 0.223 Because it does not have a central server to coordinate access, SQLite must close and reopen the database file, and thus invalidate its cache, for each transaction. In this test, each SQL statement is a separate transaction so the database file must be opened and closed and the cache must be flushed 1000 times. In spite of this, the asynchronous version of SQLite is still nearly as fast as MySQL. Notice how much slower the synchronous version is, however. SQLite calls fsync() after each synchronous transaction to make sure that all data is safely on the disk surface before continuing. For most of the 13 seconds in the synchronous test, SQLite was sitting idle waiting on disk I/O to complete. Test 2: 25000 INSERTs in a transaction BEGIN; CREATE TABLE t2(a INTEGER, b INTEGER, c VARCHAR(100)); INSERT INTO t2 VALUES(1,59672,'fifty nine thousand six hundred seventy two'); ... 24997 lines omitted INSERT INTO t2 VALUES(24999,89569,'eighty nine thousand five hundred sixty nine'); INSERT INTO t2 VALUES(25000,94666,'ninety four thousand six hundred sixty six'); COMMIT; PostgreSQL: 4.900 MySQL: 2.184 SQLite 2.7.6: 0.914 SQLite 2.7.6 (nosync): 0.757 When all the INSERTs are put in a transaction, SQLite no longer has to close and reopen the database or invalidate its cache between each statement. It also does not have to do any fsync()s until the very end. When unshackled in this way, SQLite is much faster than either PostgreSQL and MySQL. да и здесь ребята тоже так советуют делать ... |
|||
:
Нравится:
Не нравится:
|
|||
24.04.2013, 17:45 |
|
Sqlite odbc driver
|
|||
---|---|---|---|
#18+
aduka05adm, авторв данной конструкции не обязательно наличие? нет SQLite не требует обязательного наличия FROM ... |
|||
:
Нравится:
Не нравится:
|
|||
24.04.2013, 18:06 |
|
|
start [/forum/topic.php?fid=54&fpage=16&tid=2008913]: |
0ms |
get settings: |
12ms |
get forum list: |
16ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
35ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
44ms |
get tp. blocked users: |
1ms |
others: | 277ms |
total: | 409ms |
0 / 0 |