Re: [sqlite] Faster Alternative to sqlite3_blob_open

2012-02-17 Thread Roger Binns
On 17/02/12 14:51, Frank Chang wrote: I ran some tests today and found that sqlite3_blob_reopen is significantly faster than sqlite3_blob_open. Have you read the documentation? http://www.sqlite.org/c3ref/blob_reopen.html sqlite3_blob_reopen only works when you already have a blob handle

Re: [sqlite] Prepare SQL for Read-Only Database with Journal File

2012-02-17 Thread Scott Hess
On Fri, Feb 17, 2012 at 1:02 PM, Richard Hipp wrote: > On Fri, Feb 17, 2012 at 3:52 PM, Marc L. Allen > wrote: >> My concept of always consistent is a.. for lack of a better term... >> virtual concept.  That is, anytime anything accesses the

Re: [sqlite] SQLiteDataAdaptor Missing

2012-02-17 Thread Joe Mistachkin
This is probably due to an issue with the Package Load Key (PLK) fixed here (this fix will be in release 1.0.80.0): https://system.data.sqlite.org/index.html/ci/67caeebd79 In the meantime, a possible workaround is to install the Visual Studio SDK for the version of Visual Studio that you are

Re: [sqlite] Faster Alternative to sqlite3_blob_open

2012-02-17 Thread Frank Chang
Roger Binns, I ran some tests today and found that sqlite3_blob_reopen is significantly faster than sqlite3_blob_open. Attached is the Very Sleepy Full Profiler report. The modified C++ code is shown below. Thank you. unsigned long *cIntersectingDedupe::GetSubGraphBlob(sSUBGRAPHINFO

Re: [sqlite] Prepare SQL for Read-Only Database with Journal File

2012-02-17 Thread Pavel Ivanov
> If opening a DB read-only implies that the physical file is always opened > read-only, then I understand.  But, if read-only is just something for SQLite > to know that it can't modify the database, rollback would still be possible. You are right that opening database with

Re: [sqlite] Prepare SQL for Read-Only Database with Journal File

2012-02-17 Thread Marc L. Allen
> > This means that before any application can be permitted to access > (e.g. > > open) the database, that database should be made consistent. Then, > > and only then, should the application be able to open it. In another > > words, when I go to open a database, if the engine cannot provide me >

Re: [sqlite] Faster alternative to sqlite3_blob_open

2012-02-17 Thread Roger Binns
On 17/02/12 05:09, Frank Chang wrote: Is it possible to find a faster alternative to sqlite3_blob_open? sqlite3_blob_open is the fast alternative! However you are reading the entire blob contents so it won't be that different than just using a regular SQL query. Also whatever you are

Re: [sqlite] Prepare SQL for Read-Only Database with Journal File

2012-02-17 Thread Richard Hipp
On Fri, Feb 17, 2012 at 3:52 PM, Marc L. Allen wrote: > > My concept of always consistent is a.. for lack of a better term... > virtual concept. That is, anytime anything accesses the database, as a > database, that database is always consistent. > That is a good

Re: [sqlite] Prepare SQL for Read-Only Database with Journal File

2012-02-17 Thread Marc L. Allen
> The purpose of the hot journal is to restore the database to a > consistent state following an anomalous shutdown, outside the control > of SQLite, that left the database in an inconsistent state. > > Here is one of many possible examples to help explain why your > expectations are not possible

Re: [sqlite] Prepare SQL for Read-Only Database with Journal File

2012-02-17 Thread Angelo, Bryan [USA]
Thank you. It appears I misunderstood how rollback journals were operating. As a follow-up, when exactly does the rollback journal get deleted? Is there a period of time where the database itself could be in a consistent state and a rollback journal could exist containing data no longer in

Re: [sqlite] Prepare SQL for Read-Only Database with Journal File

2012-02-17 Thread Richard Hipp
On Fri, Feb 17, 2012 at 3:06 PM, Marc L. Allen wrote: > > "Rolling back" means that the database is modified so that it looks > > exactly like it did before the start of the transaction. How is SQLite > > suppose to modify a read-only file? > > I suppose it's a

Re: [sqlite] Prepare SQL for Read-Only Database with Journal File

2012-02-17 Thread Marc L. Allen
> "Rolling back" means that the database is modified so that it looks > exactly like it did before the start of the transaction. How is SQLite > suppose to modify a read-only file? I suppose it's a matter of expectations. In my mind, a database is ALWAYS consistent. Therefore, if a hot journal

Re: [sqlite] Prepare SQL for Read-Only Database with Journal File

2012-02-17 Thread Richard Hipp
On Fri, Feb 17, 2012 at 3:00 PM, Marc L. Allen wrote: > > If you have a hot journal (a rollback journal that still exists and has > > a non-zero header) that indicates that the previous process to write to > > the database did not shutdown cleanly. The journal must

Re: [sqlite] Prepare SQL for Read-Only Database with Journal File

2012-02-17 Thread Marc L. Allen
> If you have a hot journal (a rollback journal that still exists and has > a non-zero header) that indicates that the previous process to write to > the database did not shutdown cleanly. The journal must be rolled back > in order to restore the database to a consistent state. SQLite is not >

Re: [sqlite] Prepare SQL for Read-Only Database with Journal File

2012-02-17 Thread Richard Hipp
On Fri, Feb 17, 2012 at 2:45 PM, Angelo, Bryan [USA] wrote: > All, > > I am using SQLite version 3.7.8. I am receiving the SQLITE_IOERR result > code from sqlite3_prepare_v2 function when attempting to compile a PRAGMA > statement on a read-only database where a rollback

[sqlite] Prepare SQL for Read-Only Database with Journal File

2012-02-17 Thread Angelo, Bryan [USA]
All, I am using SQLite version 3.7.8. I am receiving the SQLITE_IOERR result code from sqlite3_prepare_v2 function when attempting to compile a PRAGMA statement on a read-only database where a rollback journal file also exists. Is it possible to force SQLite to ignore rollback journal files

Re: [sqlite] Incorporating user written functions into the sqlitelibrary

2012-02-17 Thread Pete
OK, back to square 1 then I guess. Pete On Fri, Feb 17, 2012 at 9:00 AM, wrote: > Message: 8 > Date: Thu, 16 Feb 2012 21:44:36 -0500 > From: "Igor Tandetnik" > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Incorporating user written

[sqlite] Master Journal

2012-02-17 Thread Marc L. Allen
I have some SQL that attaches a second database, executes a transaction that has statements which might affect the second database, but actually doesn't. Yet, a master journal is still being generated. The docs indicate that it's only created if any attached DB is actually affected. So, if I

Re: [sqlite] SQLite Random Sampling

2012-02-17 Thread Marc L. Allen
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Rick Guizawa > Sent: Friday, February 17, 2012 10:29 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] SQLite Random Sampling > > Hi All, I need help with speeding

Re: [sqlite] SQLite Random Sampling

2012-02-17 Thread Rick Guizawa
Hi All, I need help with speeding up my samples collection which is processed using C# codes and SQLite. I am doing a random sampling experiment using sqlite to find the most dominant types of lab. findings. We have about 26 years of lab experiments data provided in a table such as: CREATE TABLE

[sqlite] SQLiteDataAdaptor Missing

2012-02-17 Thread Electric Eddy
I built a project originally using SQLite-1.0.66.0-setup.exe and when I upgraded to 1.0.79 the SQLiteDataAdaptor Toolbox control under Visual Studio 2005 Professional disappeared. The project still works after updating references from 1.0.66 to 1.0.79 however I

[sqlite] Faster alternative to sqlite3_blob_open

2012-02-17 Thread Frank Chang
Good morning,We have been using sqlite3_blob_open in the function below.When I profile the application using Very Sleepy I notice that sqlite3_blob_open is one of he biggest consumers of CPU time. Is it possible to find a faster alternative to sqlite3_blob_open? Thank you unsigned long

Re: [sqlite] undefined reference to `sqlite3_db_release_memory'

2012-02-17 Thread Dan Kennedy
On 02/17/2012 03:10 PM, bhaskarReddy wrote: Hi Friends, While i am trying to use `sqlite3_db_release_memory'. I am getting error and warning as, createTable.c: In function ‘db_create_table’: createTable.c:98: warning: implicit declaration of function ‘sqlite3_db_release_memory’

Re: [sqlite] undefined reference to `sqlite3_db_release_memory'

2012-02-17 Thread Larry Brasfield
bhaskarReddy wrote: Hi Friends, Hi. Comments interjected in quoted text below. While i am trying to use `sqlite3_db_release_memory'. I am getting error and warning as, createTable.c: In function `db_create_table': createTable.c:98: warning: implicit declaration of function

Re: [sqlite] make connection to another database within sqlite3 shell command

2012-02-17 Thread Stephan Beal
On Fri, Feb 17, 2012 at 2:46 AM, 黃楨民 wrote: > 1. Should I close database before opening another ? how? > 2. How to open another database? > You need to exit the program (with the ".quit" command) and the run it again with your second database. Or you can use the ATTACH

[sqlite] undefined reference to `sqlite3_db_release_memory'

2012-02-17 Thread bhaskarReddy
Hi Friends, While i am trying to use `sqlite3_db_release_memory'. I am getting error and warning as, createTable.c: In function ‘db_create_table’: createTable.c:98: warning: implicit declaration of function ‘sqlite3_db_release_memory’ /tmp/ccSyJXew.o: In function `db_create_table':